summaryrefslogtreecommitdiffstats
path: root/llvm/test/Instrumentation/SanitizerCoverage/coverage-dbg.ll
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2014-11-24 18:46:37 +0000
committerEric Fiselier <eric@efcs.ca>2014-11-24 18:46:37 +0000
commit90c138ea6d47c363ee3f7b55f90239c46ba5cc2f (patch)
tree666c3f528217ddfef225932c72606ddc8236839f /llvm/test/Instrumentation/SanitizerCoverage/coverage-dbg.ll
parent909deebfc8b90eee317424646f6bdf358160164e (diff)
downloadbcm5719-llvm-90c138ea6d47c363ee3f7b55f90239c46ba5cc2f.tar.gz
bcm5719-llvm-90c138ea6d47c363ee3f7b55f90239c46ba5cc2f.zip
[libcxxabi] Delay adjustment of pointer to prevent referencing invalid memory.
Summary: This patch delays the dereference adjustment until we are sure the thrown type is a pointer type. It is possible the thrown type is not a pointer and is smaller than `sizeof(void*)`. If the thrown type is is smaller than `sizeof(void*)` the deference adjustment will result in a heap buffer overflow. I audited all the call sites of `can_catch(...)` and there are no places where `adjustedPtr` is used if `can_catch(...)` returns false. For this reason the patch should not introduce any functionality change. This patch fixes the following tests when using ASAN: * unwind_01.cpp * unwind_02.cpp * unwind_04.cpp Reviewers: danalbert, jroelofs, mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6353 llvm-svn: 222674
Diffstat (limited to 'llvm/test/Instrumentation/SanitizerCoverage/coverage-dbg.ll')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud