summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Ostapenko <m.ostapenko@samsung.com>2016-12-26 11:44:46 +0300
committerIvan Baravy <i.baravy@samsung.com>2017-02-22 12:32:20 +0300
commitfab406a648c12b4e7f461fabd1b72e6ce5975306 (patch)
tree74d4075a3a29f3d62cb23b621359da0bf90c71e4
parent4a796107ef71aa9345d13e940de5fc6ca3366863 (diff)
downloadlinaro-gcc-fab406a648c12b4e7f461fabd1b72e6ce5975306.tar.gz
linaro-gcc-fab406a648c12b4e7f461fabd1b72e6ce5975306.tar.bz2
linaro-gcc-fab406a648c12b4e7f461fabd1b72e6ce5975306.zip
Move lsan_check_in_progress definition to lsan_common.cc.
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.cc1
-rw-r--r--libsanitizer/lsan/lsan_common.cc3
2 files changed, 3 insertions, 1 deletions
diff --git a/libsanitizer/lsan/lsan.cc b/libsanitizer/lsan/lsan.cc
index 3c94c8832da..49b443217c9 100644
--- a/libsanitizer/lsan/lsan.cc
+++ b/libsanitizer/lsan/lsan.cc
@@ -21,7 +21,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