Skip to content

Commit a2291a5

Browse files
committed
Enable LSAN for Android
Make use of the newly added thread-properties API (available since 31). Differential Revision: https://reviews.llvm.org/D85927
1 parent 62e2ac6 commit a2291a5

29 files changed

+187
-53
lines changed

compiler-rt/cmake/config-ix.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ else()
681681
endif()
682682

683683
if (COMPILER_RT_HAS_SANITIZER_COMMON AND LSAN_SUPPORTED_ARCH AND
684-
OS_NAME MATCHES "Darwin|Linux|NetBSD|Fuchsia")
684+
OS_NAME MATCHES "Android|Darwin|Linux|NetBSD|Fuchsia")
685685
set(COMPILER_RT_HAS_LSAN TRUE)
686686
else()
687687
set(COMPILER_RT_HAS_LSAN FALSE)

compiler-rt/lib/asan/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ append_rtti_flag(OFF ASAN_CFLAGS)
8686
set(ASAN_DYNAMIC_LINK_FLAGS ${SANITIZER_COMMON_LINK_FLAGS})
8787

8888
if(ANDROID)
89+
list(APPEND ASAN_CFLAGS -fno-emulated-tls)
90+
list(APPEND ASAN_DYNAMIC_LINK_FLAGS -fuse-ld=lld)
8991
# Put most Sanitizer shared libraries in the global group. For more details, see
9092
# android-changes-for-ndk-developers.md#changes-to-library-search-order
9193
if (COMPILER_RT_HAS_Z_GLOBAL)
@@ -232,7 +234,9 @@ else()
232234
-Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/clang_rt.asan-dynamic-${arch}.vers)
233235
# The Solaris 11.4 linker supports a subset of GNU ld version scripts,
234236
# but requires a special option to enable it.
235-
if (COMPILER_RT_HAS_GNU_VERSION_SCRIPT_COMPAT)
237+
# This is used/compatible with ANDROID because we force `lld` on ANDROID (line 90).
238+
# Therefore we don't want to add it for ANDROID.
239+
if (COMPILER_RT_HAS_GNU_VERSION_SCRIPT_COMPAT AND NOT ANDROID)
236240
list(APPEND VERSION_SCRIPT_FLAG -Wl,-z,gnu-version-script-compat)
237241
endif()
238242
set_property(SOURCE

compiler-rt/lib/asan/tests/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ if(APPLE)
9191
endif()
9292
if(ANDROID)
9393
list(APPEND ASAN_UNITTEST_COMMON_LINK_FLAGS -pie)
94+
list(APPEND ASAN_UNITTEST_COMMON_LINK_FLAGS -fuse-ld=lld)
9495
endif()
9596

9697
set(ASAN_UNITTEST_INSTRUMENTED_LINK_FLAGS
@@ -288,6 +289,7 @@ if(ANDROID)
288289
$<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>
289290
$<TARGET_OBJECTS:RTSanitizerCommonCoverage.${arch}>
290291
$<TARGET_OBJECTS:RTSanitizerCommonSymbolizer.${arch}>
292+
$<TARGET_OBJECTS:RTLSanCommon.${arch}>
291293
$<TARGET_OBJECTS:RTUbsan.${arch}>
292294
$<TARGET_OBJECTS:RTUbsan_cxx.${arch}>
293295
${COMPILER_RT_GTEST_SOURCE}

compiler-rt/lib/lsan/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
include_directories(..)
22

33
set(LSAN_CFLAGS ${SANITIZER_COMMON_CFLAGS})
4+
set(LSAN_LINK_FLAGS ${SANITIZER_COMMON_LINK_FLAGS})
45
append_rtti_flag(OFF LSAN_CFLAGS)
56

67
set(LSAN_COMMON_SOURCES
@@ -33,6 +34,11 @@ set(LSAN_HEADERS
3334

3435
set(LSAN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
3536

37+
if(ANDROID)
38+
list(APPEND LSAN_CFLAGS -fno-emulated-tls)
39+
list(APPEND LSAN_LINK_FLAGS -fuse-ld=lld)
40+
endif()
41+
3642
add_compiler_rt_object_libraries(RTLSanCommon
3743
OS ${SANITIZER_COMMON_SUPPORTED_OS}
3844
ARCHS ${LSAN_COMMON_SUPPORTED_ARCH}
@@ -61,7 +67,7 @@ if(COMPILER_RT_HAS_LSAN)
6167
RTSanitizerCommonCoverage
6268
RTSanitizerCommonSymbolizer
6369
CFLAGS ${LSAN_CFLAGS}
64-
LINK_FLAGS ${SANITIZER_COMMON_LINK_FLAGS} ${WEAK_SYMBOL_LINK_FLAGS}
70+
LINK_FLAGS ${LSAN_LINK_FLAGS} ${WEAK_SYMBOL_LINK_FLAGS}
6571
LINK_LIBS ${LSAN_LINK_LIBS}
6672
PARENT_TARGET lsan)
6773
else()
@@ -78,6 +84,7 @@ if(COMPILER_RT_HAS_LSAN)
7884
$<TARGET_OBJECTS:RTLSanCommon.${arch}>
7985
ADDITIONAL_HEADERS ${LSAN_HEADERS}
8086
CFLAGS ${LSAN_CFLAGS}
87+
LINK_FLAGS ${LSAN_LINK_FLAGS}
8188
PARENT_TARGET lsan)
8289
endforeach()
8390
endif()

compiler-rt/lib/lsan/lsan_common.cpp

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,17 @@ static const char kSuppressionLeak[] = "leak";
7171
static const char *kSuppressionTypes[] = { kSuppressionLeak };
7272
static const char kStdSuppressions[] =
7373
#if SANITIZER_SUPPRESS_LEAK_ON_PTHREAD_EXIT
74-
// For more details refer to the SANITIZER_SUPPRESS_LEAK_ON_PTHREAD_EXIT
75-
// definition.
76-
"leak:*pthread_exit*\n"
74+
// For more details refer to the SANITIZER_SUPPRESS_LEAK_ON_PTHREAD_EXIT
75+
// definition.
76+
"leak:*pthread_exit*\n"
7777
#endif // SANITIZER_SUPPRESS_LEAK_ON_PTHREAD_EXIT
7878
#if SANITIZER_MAC
79-
// For Darwin and os_log/os_trace: https://reviews.llvm.org/D35173
80-
"leak:*_os_trace*\n"
79+
// For Darwin and os_log/os_trace: https://reviews.llvm.org/D35173
80+
"leak:*_os_trace*\n"
8181
#endif
82-
// TLS leak in some glibc versions, described in
83-
// https://sourceware.org/bugzilla/show_bug.cgi?id=12650.
84-
"leak:*tls_get_addr*\n";
82+
// TLS leak in some glibc versions, described in
83+
// https://sourceware.org/bugzilla/show_bug.cgi?id=12650.
84+
"leak:*tls_get_addr*\n";
8585

8686
void InitializeSuppressions() {
8787
CHECK_EQ(nullptr, suppression_ctx);
@@ -294,6 +294,22 @@ static void ProcessThreads(SuspendedThreadsList const &suspended_threads,
294294
kReachable);
295295
}
296296
}
297+
#if SANITIZER_ANDROID
298+
if (HAS_ANDROID_THREAD_PROPERTIES_API) {
299+
auto *cb = +[](void *dtls_begin, void *dtls_end, uptr /*dso_idd*/,
300+
void *arg) -> void {
301+
ScanRangeForPointers(reinterpret_cast<uptr>(dtls_begin),
302+
reinterpret_cast<uptr>(dtls_end),
303+
reinterpret_cast<Frontier *>(arg), "DTLS",
304+
kReachable);
305+
};
306+
307+
// FIXME: There might be a race-condition here (and in Bionic) if the
308+
// thread is suspended in the middle of updating its DTLS. IOWs, we
309+
// could scan already freed memory. (probably fine for now)
310+
__libc_iterate_dynamic_tls(os_id, cb, frontier);
311+
}
312+
#else
297313
if (dtls && !DTLSInDestruction(dtls)) {
298314
for (uptr j = 0; j < dtls->dtv_size; ++j) {
299315
uptr dtls_beg = dtls->dtv[j].beg;
@@ -309,6 +325,7 @@ static void ProcessThreads(SuspendedThreadsList const &suspended_threads,
309325
// this and continue.
310326
LOG_THREADS("Thread %d has DTLS under destruction.\n", os_id);
311327
}
328+
#endif
312329
}
313330
}
314331
}
@@ -575,8 +592,16 @@ static void CheckForLeaksCallback(const SuspendedThreadsList &suspended_threads,
575592
}
576593

577594
static bool CheckForLeaks() {
595+
#if SANITIZER_ANDROID
596+
// Presence of the ThreadProperties API implies the presence of
597+
// TLS support, which is required for calling __lsan_is_turned_off().
598+
// Therefore, this check must preceed that.
599+
if (!HAS_ANDROID_THREAD_PROPERTIES_API)
600+
return false;
601+
#endif
602+
578603
if (&__lsan_is_turned_off && __lsan_is_turned_off())
579-
return false;
604+
return false;
580605
EnsureMainThreadIDIsCorrect();
581606
CheckForLeaksParam param;
582607
LockStuffAndStopTheWorld(CheckForLeaksCallback, &param);

compiler-rt/lib/lsan/lsan_common.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,13 @@
2929
// To enable LeakSanitizer on a new architecture, one needs to implement the
3030
// internal_clone function as well as (probably) adjust the TLS machinery for
3131
// the new architecture inside the sanitizer library.
32-
#if (SANITIZER_LINUX && !SANITIZER_ANDROID || SANITIZER_MAC) && \
33-
(SANITIZER_WORDSIZE == 64) && \
32+
#if (SANITIZER_LINUX || SANITIZER_MAC) && (SANITIZER_WORDSIZE == 64) && \
3433
(defined(__x86_64__) || defined(__mips64) || defined(__aarch64__) || \
3534
defined(__powerpc64__) || defined(__s390x__))
3635
#define CAN_SANITIZE_LEAKS 1
37-
#elif defined(__i386__) && \
38-
(SANITIZER_LINUX && !SANITIZER_ANDROID || SANITIZER_MAC)
36+
#elif defined(__i386__) && (SANITIZER_LINUX || SANITIZER_MAC)
3937
#define CAN_SANITIZE_LEAKS 1
40-
#elif defined(__arm__) && \
41-
SANITIZER_LINUX && !SANITIZER_ANDROID
38+
#elif defined(__arm__) && SANITIZER_LINUX
4239
#define CAN_SANITIZE_LEAKS 1
4340
#elif SANITIZER_NETBSD || SANITIZER_FUCHSIA
4441
#define CAN_SANITIZE_LEAKS 1

compiler-rt/lib/lsan/lsan_common_linux.cpp

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,28 @@ static bool IsLinker(const LoadedModule& module) {
4141

4242
__attribute__((tls_model("initial-exec")))
4343
THREADLOCAL int disable_counter;
44-
bool DisabledInThisThread() { return disable_counter > 0; }
45-
void DisableInThisThread() { disable_counter++; }
44+
bool DisabledInThisThread() {
45+
#if SANITIZER_ANDROID
46+
// LSAN is only enabled with Android-S and up.
47+
if (!HAS_ANDROID_THREAD_PROPERTIES_API)
48+
return true;
49+
#endif
50+
return disable_counter > 0;
51+
}
52+
void DisableInThisThread() {
53+
#if SANITIZER_ANDROID
54+
// LSAN is only enabled with Android-S and up.
55+
if (!HAS_ANDROID_THREAD_PROPERTIES_API)
56+
return;
57+
#endif
58+
disable_counter++;
59+
}
4660
void EnableInThisThread() {
61+
#if SANITIZER_ANDROID
62+
// LSAN is only enabled with Android-S and up.
63+
if (!HAS_ANDROID_THREAD_PROPERTIES_API)
64+
return;
65+
#endif
4766
if (disable_counter == 0) {
4867
DisableCounterUnderflow();
4968
}
@@ -95,7 +114,15 @@ static int ProcessGlobalRegionsCallback(struct dl_phdr_info *info, size_t size,
95114

96115
// Scans global variables for heap pointers.
97116
void ProcessGlobalRegions(Frontier *frontier) {
98-
if (!flags()->use_globals) return;
117+
if (!flags()->use_globals) {
118+
#if SANITIZER_ANDROID
119+
// There are known malloc'ed global variables from libc[++] on Android.
120+
// If use_globals is turnt off, we could see leaks.
121+
// Issue a warning in case users turn it off by accident.
122+
Report("use_globals=0 on Android could lead to false reports.");
123+
#endif
124+
return;
125+
}
99126
dl_iterate_phdr(ProcessGlobalRegionsCallback, frontier);
100127
}
101128

compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,9 @@
104104
//
105105
// FIXME: do we have anything like this on Mac?
106106
#ifndef SANITIZER_CAN_USE_PREINIT_ARRAY
107-
#if ((SANITIZER_LINUX && !SANITIZER_ANDROID) || SANITIZER_OPENBSD || \
108-
SANITIZER_FUCHSIA || SANITIZER_NETBSD) && !defined(PIC)
107+
#if (SANITIZER_LINUX || SANITIZER_OPENBSD || SANITIZER_FUCHSIA || \
108+
SANITIZER_NETBSD) && \
109+
!defined(PIC)
109110
#define SANITIZER_CAN_USE_PREINIT_ARRAY 1
110111
// Before Solaris 11.4, .preinit_array is fully supported only with GNU ld.
111112
// FIXME: Check for those conditions.

compiler-rt/lib/sanitizer_common/sanitizer_linux.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,16 @@ ALWAYS_INLINE uptr *get_android_tls_ptr() {
154154
return reinterpret_cast<uptr *>(&__get_tls()[TLS_SLOT_SANITIZER]);
155155
}
156156

157+
// Bionic provides this API since 31.
158+
extern "C" SANITIZER_WEAK_ATTRIBUTE void __libc_get_static_tls_bounds(void **,
159+
void **);
160+
extern "C" SANITIZER_WEAK_ATTRIBUTE void __libc_iterate_dynamic_tls(
161+
pid_t, void (*cb)(void *, void *, uptr, void *), void *);
162+
163+
#define HAS_ANDROID_THREAD_PROPERTIES_API (&__libc_iterate_dynamic_tls != 0)
164+
165+
#else
166+
#define HAS_ANDROID_THREAD_PROPERTIES_API (0)
157167
#endif // SANITIZER_ANDROID
158168

159169
} // namespace __sanitizer

compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,19 @@ int GetSizeFromHdr(struct dl_phdr_info *info, size_t size, void *data) {
460460

461461
#if !SANITIZER_GO
462462
static void GetTls(uptr *addr, uptr *size) {
463-
#if SANITIZER_LINUX && !SANITIZER_ANDROID
463+
#if SANITIZER_ANDROID
464+
if (HAS_ANDROID_THREAD_PROPERTIES_API) {
465+
void *start_addr;
466+
void *end_addr;
467+
__libc_get_static_tls_bounds(&start_addr, &end_addr);
468+
*addr = reinterpret_cast<uptr>(start_addr);
469+
*size =
470+
reinterpret_cast<uptr>(end_addr) - reinterpret_cast<uptr>(start_addr);
471+
} else {
472+
*addr = 0;
473+
*size = 0;
474+
}
475+
#elif SANITIZER_LINUX && !SANITIZER_ANDROID
464476
#if defined(__x86_64__) || defined(__i386__) || defined(__s390__)
465477
*addr = ThreadSelf();
466478
*size = GetTlsSize();
@@ -504,9 +516,6 @@ static void GetTls(uptr *addr, uptr *size) {
504516
#elif SANITIZER_OPENBSD
505517
*addr = 0;
506518
*size = 0;
507-
#elif SANITIZER_ANDROID
508-
*addr = 0;
509-
*size = 0;
510519
#elif SANITIZER_SOLARIS
511520
// FIXME
512521
*addr = 0;

compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,14 +504,15 @@
504504
#define SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO \
505505
(!SI_FREEBSD && !SI_MAC && !SI_NETBSD && !SI_OPENBSD && SI_NOT_FUCHSIA && \
506506
SI_NOT_RTEMS && !SI_SOLARIS)
507-
#define SANITIZER_INTERCEPT_MEMALIGN \
508-
(!SI_FREEBSD && !SI_MAC && !SI_NETBSD && !SI_OPENBSD && SI_NOT_RTEMS)
507+
#define SANITIZER_INTERCEPT_MEMALIGN \
508+
(!SI_FREEBSD && !SI_MAC && !SI_NETBSD && !SI_OPENBSD && SI_NOT_RTEMS && \
509+
!SI_ANDROID)
509510
#define SANITIZER_INTERCEPT_PVALLOC \
510511
(!SI_FREEBSD && !SI_MAC && !SI_NETBSD && !SI_OPENBSD && SI_NOT_FUCHSIA && \
511512
SI_NOT_RTEMS && !SI_SOLARIS)
512513
#define SANITIZER_INTERCEPT_CFREE \
513514
(!SI_FREEBSD && !SI_MAC && !SI_NETBSD && !SI_OPENBSD && SI_NOT_FUCHSIA && \
514-
SI_NOT_RTEMS && !SI_SOLARIS)
515+
SI_NOT_RTEMS && !SI_SOLARIS && !SI_ANDROID)
515516
#define SANITIZER_INTERCEPT_REALLOCARRAY SI_POSIX
516517
#define SANITIZER_INTERCEPT_ALIGNED_ALLOC (!SI_MAC && SI_NOT_RTEMS)
517518
#define SANITIZER_INTERCEPT_MALLOC_USABLE_SIZE \

compiler-rt/test/asan/TestCases/coverage-and-lsan.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
// RUN: %sancov print %t-dir/*.sancov 2>&1
1010
//
1111
// REQUIRES: leak-detection
12-
12+
// FIXME: sancov paths not work with adb
13+
// UNSUPPORTED: android
1314
int *g = new int;
1415
int main(int argc, char **argv) {
1516
g = 0;

compiler-rt/test/asan/lit.cfg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,11 @@ def build_invocation(compile_flags):
209209
config.available_features.add('fast-unwinder-works')
210210

211211
# Turn on leak detection on 64-bit Linux.
212+
leak_detection_android = config.android and 'android-thread-properties-api' in config.available_features and (config.target_arch == 'x86_64' or config.target_arch == 'i386' or config.target_arch == 'i686' or config.target_arch == 'aarch64' )
212213
leak_detection_linux = (config.host_os == 'Linux') and (not config.android) and (config.target_arch == 'x86_64' or config.target_arch == 'i386')
213214
leak_detection_mac = (config.host_os == 'Darwin') and (config.target_arch == 'x86_64')
214215
leak_detection_netbsd = (config.host_os == 'NetBSD') and (config.target_arch in ['x86_64', 'i386'])
215-
if leak_detection_linux or leak_detection_mac or leak_detection_netbsd:
216+
if leak_detection_android or leak_detection_linux or leak_detection_mac or leak_detection_netbsd:
216217
config.available_features.add('leak-detection')
217218

218219
# Set LD_LIBRARY_PATH to pick dynamic runtime up properly.

compiler-rt/test/lit.common.cfg.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@
6161
# BFD linker in 64-bit android toolchains fails to find libc++_shared.so, which
6262
# is a transitive shared library dependency (via asan runtime).
6363
if config.android:
64+
# These are needed for tests to upload/download temp files, such as
65+
# suppression-files, to device.
66+
config.substitutions.append( ('%device_rundir', "/data/local/tmp/Output") )
67+
# FIXME: May need to select specific device with `-s SERIAL`
68+
config.substitutions.append( ('%push_to_device', "adb push ") )
69+
config.substitutions.append( ('%pull_from_device', "adb pull ") )
70+
config.substitutions.append( ('%adb_shell ', "adb shell ") )
6471
# Prepend the flag so that it can be overridden.
6572
config.target_cflags = "-pie -fuse-ld=gold " + config.target_cflags
6673
if config.android_ndk_version < 19:
@@ -69,7 +76,11 @@
6976
# just contains a handful of ABI functions", which makes most C++ code fail
7077
# to link. In r19 and later we just use the default which is libc++.
7178
config.cxx_mode_flags.append('-stdlib=libstdc++')
72-
79+
else:
80+
config.substitutions.append( ('%device_rundir', "") )
81+
config.substitutions.append( ('%push_to_device', "echo ") )
82+
config.substitutions.append( ('%pull_from_device', "echo ") )
83+
config.substitutions.append( ('%adb_shell', "echo ") )
7384
config.environment = dict(os.environ)
7485

7586
# Clear some environment variables that might affect Clang.
@@ -341,10 +352,15 @@ def get_macos_aligned_version(macos_vers):
341352
if config.android_serial:
342353
env['ANDROID_SERIAL'] = config.android_serial
343354
config.environment['ANDROID_SERIAL'] = config.android_serial
344-
355+
# Must use lld because Bionic's TLS layout is not compatible with the Gold convention.
356+
# The buildbot script will guarantee lld is built/included.
357+
# The check for `has_lld` somehow missed that it exists and always marked tests as "unsupported".
358+
config.use_lld = True
359+
config.has_lld = True
345360
adb = os.environ.get('ADB', 'adb')
346361
try:
347362
android_api_level_str = subprocess.check_output([adb, "shell", "getprop", "ro.build.version.sdk"], env=env).rstrip()
363+
android_api_codename = subprocess.check_output([adb, "shell", "getprop", "ro.build.version.codename"], env=env).rstrip().decode("utf-8")
348364
except (subprocess.CalledProcessError, OSError):
349365
lit_config.fatal("Failed to read ro.build.version.sdk (using '%s' as adb)" % adb)
350366
try:
@@ -355,6 +371,8 @@ def get_macos_aligned_version(macos_vers):
355371
config.available_features.add('android-26')
356372
if android_api_level >= 28:
357373
config.available_features.add('android-28')
374+
if android_api_level >= 31 or android_api_codename == 'S':
375+
config.available_features.add('android-thread-properties-api')
358376

359377
# Prepare the device.
360378
android_tmpdir = '/data/local/tmp/Output'
@@ -374,7 +392,7 @@ def get_macos_aligned_version(macos_vers):
374392
from distutils.version import LooseVersion
375393
ver = LooseVersion(ver_line.split()[-1].decode())
376394
# 2.27 introduced some incompatibilities
377-
if ver >= LooseVersion("2.27"):
395+
if ver >= LooseVersion("2.27") and not config.android:
378396
config.available_features.add("glibc-2.27")
379397

380398
sancovcc_path = os.path.join(config.llvm_tools_dir, "sancov")

compiler-rt/test/lsan/TestCases/Linux/cleanup_in_tsd_destructor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// user-installed TSD destructors have finished running (since they may contain
44
// additional cleanup tasks). LSan doesn't actually meet that goal 100%, but it
55
// makes its best effort.
6-
// RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0:use_globals=0"
6+
// RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0"
77
// RUN: %clang_lsan %s -o %t
88
// RUN: %env_lsan_opts=$LSAN_BASE:use_tls=1 %run %t
99
// RUN: %env_lsan_opts=$LSAN_BASE:use_tls=0 not %run %t 2>&1 | FileCheck %s

0 commit comments

Comments
 (0)