[llvm-commits] [llvm] r161446 - /llvm/trunk/lib/CodeGen/StackProtector.cpp

Chris Lattner clattner at apple.com
Tue Aug 7 22:23:02 PDT 2012


On Aug 7, 2012, at 2:20 PM, Aaron Ballman <aaron at aaronballman.com> wrote:

> Do we know why gcc does this?  I'm all for compatibility, but it seems
> like it's taking away a fairly nice safety feature so I am hoping
> there's some more logic here.

The logic here was that char arrays are the most likely to be overflowed (because people use poor functions like strcat on them), so we get the most bang for the performance buck by instrumenting them.  Instrumenting other arrays (e.g. float arrays) adds overhead that is less likely to find a bug.

-Chris



More information about the llvm-commits mailing list