[llvm] r212537 - Fix some Twine locals.

Benjamin Kramer benny.kra at gmail.com
Thu Jul 10 01:28:33 PDT 2014

On Thu, Jul 10, 2014 at 1:15 AM, Reid Kleckner <rnk at google.com> wrote:
> On Tue, Jul 8, 2014 at 7:55 AM, Benjamin Kramer <benny.kra at googlemail.com>
> wrote:
>> Author: d0k
>> Date: Tue Jul  8 09:55:06 2014
>> New Revision: 212537
>> URL: http://llvm.org/viewvc/llvm-project?rev=212537&view=rev
>> Log:
>> Fix some Twine locals.
>> Two of those are use after frees. Found by clang-tidy, fixed by me.
> More like, "use after destroy" bugs, right?  I thought Twine doesn't do any
> heap allocation, just stack allocation.
> It's easy for these to bugs slip in when you have a compiler that doesn't
> aggressively reuse stack space of dead temporaries.  *cough clang -O0*

Right, that's why I wrote this check. I'm not entirely sure how to
call this class of bug, went with "stack use-after-free" which is a
bit odd as there is no free() involved. Is "use-after-destroy" more
widely used?

- Ben

More information about the llvm-commits mailing list