[llvm-commits] [llvm-gcc-4.2] r77036 - /llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp

Daniel Dunbar daniel at zuster.org
Sun Jul 26 04:18:29 PDT 2009


On Sun, Jul 26, 2009 at 3:31 AM, Bill Wendling<isanbard at gmail.com> wrote:
> On Jul 24, 2009, at 6:37 PM, Daniel Dunbar wrote:
>> Protect from LLVM API changes; this also fixes a potential use-after-
>> free!
>>
> What UAF?
>
> -bw

--
>> -    const char *Name = GV->getName().c_str();

The std::string which GV->getName() used to return is destroyed at the
end of this statement, leaving Name dangling.
--

 - Daniel




More information about the llvm-commits mailing list