aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/InitHeaderSearch.cpp
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2012-03-02 10:41:08 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2012-03-02 10:41:08 +0000
commitd33e3d8c6e5f0d92451a3e56320b9f81ae664c50 (patch)
tree90fd6f716b9223e421c11740010a81adb3ac5e54 /clang/lib/Frontend/InitHeaderSearch.cpp
parentbecfda3e40831b06814f18a119db36183f2476b4 (diff)
downloadllvm-d33e3d8c6e5f0d92451a3e56320b9f81ae664c50.zip
llvm-d33e3d8c6e5f0d92451a3e56320b9f81ae664c50.tar.gz
llvm-d33e3d8c6e5f0d92451a3e56320b9f81ae664c50.tar.bz2
ASan: use getTypeAllocSize instead of getTypeStoreSize.
This change replaces getTypeStoreSize with getTypeAllocSize in AddressSanitizer instrumentation for stack allocations. One case where old behaviour produced undesired results is an optimization in InstCombine pass (PromoteCastOfAllocation), which can replace alloca(T) with alloca(S), where S has the same AllocSize, but a smaller StoreSize. Another case is memcpy(long double => long double), where ASan will poison bytes 10-15 of a stack-allocated long double (StoreSize 10, AllocSize 16, sizeof(long double) = 16). See http://llvm.org/bugs/show_bug.cgi?id=12047 for more context. llvm-svn: 151887
Diffstat (limited to 'clang/lib/Frontend/InitHeaderSearch.cpp')
0 files changed, 0 insertions, 0 deletions