Go to file
Eric Fiselier 90c138ea6d [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
2014-11-24 18:46:37 +00:00
clang Reverting r222646; the tests do not pass on Windows. Also reverts r222664, which was required for r222646 to compile with Visual Studio 2012. 2014-11-24 17:39:44 +00:00
clang-tools-extra [clang-tidy] Set google-readability-namespace-comments.ShortNamespaceLines to 10 2014-11-20 15:05:32 +00:00
compiler-rt [compiler-rt] Make the MSAN wmemset intercepter call wmemset instead of memset. Fixes PR 21579 2014-11-24 18:17:04 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Don't include <stddef.h> 2014-11-18 14:19:27 +00:00
libcxx Handle extra whitespace in linux distribution name. 2014-11-21 08:54:35 +00:00
libcxxabi [libcxxabi] Delay adjustment of pointer to prevent referencing invalid memory. 2014-11-24 18:46:37 +00:00
lld Silence a -Wcast-qual warning 2014-11-22 00:45:01 +00:00
lldb Fix lldb(1) man page formatting 2014-11-24 15:01:11 +00:00
llvm [PowerPC] Fix PR 21652 - copy st_other bits on symbol assignment 2014-11-24 18:09:47 +00:00
openmp I apologise in advance for the size of this check-in. At Intel we do 2014-10-07 16:25:50 +00:00
polly Use isl_schedule_get_ctx 2014-11-21 19:39:42 +00:00