Skip to content

Commit 0eccf13

Browse files
authored
[LSan] skip leaks from dlerror (#142876)
We have known false positives, and the return value is never user-managed anyway.
1 parent dbee0d5 commit 0eccf13

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

compiler-rt/lib/lsan/lsan_common.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ static const char kStdSuppressions[] =
124124
# endif
125125
// TLS leak in some glibc versions, described in
126126
// https://sourceware.org/bugzilla/show_bug.cgi?id=12650.
127-
"leak:*tls_get_addr*\n";
127+
"leak:*tls_get_addr*\n"
128+
"leak:*dlerror*\n";
128129

129130
void InitializeSuppressions() {
130131
CHECK_EQ(nullptr, suppression_ctx);

compiler-rt/test/hwasan/TestCases/Posix/dlerror.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// This is currently not implemented, so this test is XFAIL.
33

44
// RUN: %clangxx_hwasan -O0 %s -o %t && HWASAN_OPTIONS=detect_leaks=1 %run %t
5-
// XFAIL: *
65

76
#include <assert.h>
87
#include <dlfcn.h>
@@ -12,7 +11,8 @@
1211
#include <string.h>
1312
#include <unistd.h>
1413

15-
constexpr auto kKeys = 500;
14+
// musl only has 128 keys
15+
constexpr auto kKeys = 100;
1616

1717
int main(int argc, char **argv) {
1818
__hwasan_enable_allocator_tagging();

0 commit comments

Comments
 (0)