diff options
author | Maxim Ostapenko <m.ostapenko@samsung.com> | 2016-12-26 11:44:46 +0300 |
---|---|---|
committer | Maxim Ostapenko <m.ostapenko@samsung.com> | 2016-12-26 13:28:45 +0300 |
commit | edf4608f9dfb53b6efd775f8c8c0256b2786dd06 (patch) | |
tree | ab39302fd2c697af73553f64f12993c737a83371 | |
parent | 059d7696a8c6ab63d1bf4271a20629e76fcd392e (diff) | |
download | linaro-gcc-sandbox/mro/lsan.tar.gz linaro-gcc-sandbox/mro/lsan.tar.bz2 linaro-gcc-sandbox/mro/lsan.zip |
Move lsan_check_in_progress definition to lsan_common.cc.sandbox/mro/lsan
This commit fixes undefined reference error from libasan.so:
/lib/libasan.so: undefined reference to `lsan_check_in_progress'
occurred due to ASan runtime embeds part of LSan runtime and
misses lsan_check_in_progress symbol. To overcome the issue, just move
lsan_check_in_progress definition to lsan_common.cc.
Change-Id: I9ed7f4d490d525bbf7ce054285afaec24716f35a
Signed-off-by: Maxim Ostapenko <m.ostapenko@samsung.com>
-rw-r--r-- | libsanitizer/lsan/lsan.cc | 1 | ||||
-rw-r--r-- | libsanitizer/lsan/lsan_common.cc | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/libsanitizer/lsan/lsan.cc b/libsanitizer/lsan/lsan.cc index c8ea483d676..33051cef1d5 100644 --- a/libsanitizer/lsan/lsan.cc +++ b/libsanitizer/lsan/lsan.cc @@ -22,7 +22,6 @@ bool lsan_inited; bool lsan_init_is_running; -bool lsan_check_in_progress; namespace __lsan { diff --git a/libsanitizer/lsan/lsan_common.cc b/libsanitizer/lsan/lsan_common.cc index 23408508ecf..866e23f4049 100644 --- a/libsanitizer/lsan/lsan_common.cc +++ b/libsanitizer/lsan/lsan_common.cc @@ -24,6 +24,9 @@ #include "sanitizer_common/sanitizer_report_decorator.h" #if CAN_SANITIZE_LEAKS +// TODO (chefmax): Figure out how we can avoid pollutting global namespace. +bool lsan_check_in_progress; + namespace __lsan { // This mutex is used to prevent races between DoLeakCheck and IgnoreObject, and |