[Mesa-dev] [PATCH] Avoid ASan new-delete-type-mismatch

Ilia Mirkin imirkin at alum.mit.edu
Fri Jun 10 15:37:34 UTC 2016


On Fri, Jun 10, 2016 at 11:32 AM, Jan Vesely <jan.vesely at rutgers.edu> wrote:
> On Fri, 2016-06-10 at 11:20 -0400, Ilia Mirkin wrote:
>> On Fri, Jun 10, 2016 at 6:28 AM, Stephan Bergmann <sbergman at redhat.co
>> m> wrote:
>> > On 06/10/2016 12:09 PM, Eric Engestrom wrote:
>> > >
>> > > On Thu, Jun 09, 2016 at 05:13:20PM +0200, Stephan Bergmann wrote:
>> > >
>> > > Since you didn't send this patch from your primary email account,
>> > > you might want to add this line here, otherwise the author will
>> > > be
>> > > "stephan.bergmann.secondary at googlemail.com":
>> > >
>> > > From: Stephan Bergmann <sbergman at redhat.com>
>> >
>> >
>> > Add that line where exactly?
>> >
>> > (Seriously, this starts to get boring to me.  I had a rather
>> > trivial
>> > drive-by patch.  I got asked to provide it as exactly "git send-
>> > email" (a
>> > "git format-patch"'ed attachment apparently didn't suit reviewers,
>> > for
>> > whatever reasons), so I dutifully set up "git send-email" (which I
>> > never use
>> > otherwise).  It didn't work with my primary SMTP server (which I
>> > didn't
>> > bother to investigate into further), so I used another one that
>> > happened to
>> > work.  I don't really care with what attribution that change would
>> > be
>> > merged.)
>>
>> It's pretty easy for me to fix up before I apply it too, but if I
>> "git
>> am" your email, it'll be attributed to the one you sent it from,
>> unless that From line is there as line 1 of the email body. Just let
>> me know if you want me to fix it up. Despite the fact that the patch
>> is a 1-liner, I need to spend a few minutes carefully going through
>> things to ensure that it really is OK to make that destructor virtual
>> - I should get the time tonight or tomorrow.
>
> adding virtual destructor is always OK. If you're worried about
> possible performance implications, the compiler devirtualization pass
> should handle those cases.

Not when the original code explicitly relies on it being non-virtual.
Just have to make sure that wasn't the case. The original author of a
lot of this code tended to do tricky things, I wouldn't put this past
him.

  -ilia


More information about the mesa-dev mailing list