diff options
author | Alexander Potapenko <glider@google.com> | 2013-11-13 13:34:53 +0000 |
---|---|---|
committer | Alexander Potapenko <glider@google.com> | 2013-11-13 13:34:53 +0000 |
commit | fa82ba91f943274c91801348ec78fa6c02767736 (patch) | |
tree | 9daaad5d5be2a1e264ae69ff01ebec5170a58f1f /llvm/lib/MC/MCAsmInfo.cpp | |
parent | 04a1767a2e181fdffe2be375334915d60e0fe022 (diff) | |
download | bcm5719-llvm-fa82ba91f943274c91801348ec78fa6c02767736.tar.gz bcm5719-llvm-fa82ba91f943274c91801348ec78fa6c02767736.zip |
[ASan] Don't call __asan_init() from certain interceptors on Darwin.
Fixes http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58994, which hadn't
manifested in LLVM because libclang_rt.asan_osx_dynamic.dylib used to depend on
the Foundation framework.
Without that dependency some interceptors may be called from the system
libraries before libSystem_initializer() is called, which lead to assertion
failures in sanitizer_mac.cc (_NSGetEnviron() returns NULL).
To fix the problem we fall back to the original functions in the common
libsanitizer interceptors and the __cxa_atexit() interceptor on Darwin.
This patch also prints a better error message in the case _NSGetEnviron()
returns NULL.
llvm-svn: 194573
Diffstat (limited to 'llvm/lib/MC/MCAsmInfo.cpp')
0 files changed, 0 insertions, 0 deletions