Skip to content

Commit beac880

Browse files
authored
Better fix for the stack_container_dynamic_lib test (#168798)
Add the missing %libdl to the link command
1 parent 9e9fe08 commit beac880

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

compiler-rt/test/asan/TestCases/stack_container_dynamic_lib.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,22 @@
22
// in order to handle uninstrumented libraries
33
// UNSUPPORTED: target={{.*windows-msvc.*}}
44

5-
// FIXME: Fix this test under GCC.
6-
// REQUIRES: Clang
7-
85
// Mimic a closed-source library compiled without ASan
96
// RUN: %clangxx_asan -fno-sanitize=address -DSHARED_LIB %s %fPIC -shared -o %t-so.so
107

118
// Mimic multiple files being linked into a single executable,
129
// %t-object.o and %t-main compiled seperately and then linked together
1310
// RUN: %clangxx_asan -DMULTI_SOURCE %s -c -o %t-object.o
1411
// RUN: %clangxx_asan %s -c -o %t-main.o
15-
// RUN: %clangxx_asan -o %t %t-main.o %t-object.o
12+
// RUN: %clangxx_asan -o %t %t-main.o %t-object.o %libdl
1613
// RUN: not %run %t 2>&1 | FileCheck %s
1714

1815
// Disable container overflow checks at runtime using ASAN_OPTIONS=detect_container_overflow=0
1916
// RUN: %env_asan_opts=detect_container_overflow=0 %run %t 2>&1 | FileCheck --check-prefix=CHECK-NO-CONTAINER-OVERFLOW %s
2017

2118
// RUN: %clangxx_asan -D__SANITIZER_DISABLE_CONTAINER_OVERFLOW__ -DMULTI_SOURCE %s -c -o %t-object.o
2219
// RUN: %clangxx_asan -D__SANITIZER_DISABLE_CONTAINER_OVERFLOW__ %s -c -o %t-main.o
23-
// RUN: %clangxx_asan -D__SANITIZER_DISABLE_CONTAINER_OVERFLOW__ -o %t %t-main.o %t-object.o
20+
// RUN: %clangxx_asan -D__SANITIZER_DISABLE_CONTAINER_OVERFLOW__ -o %t %t-main.o %t-object.o %libdl
2421
// RUN: %run %t 2>&1 | FileCheck --check-prefix=CHECK-NO-CONTAINER-OVERFLOW %s
2522

2623
#include <assert.h>

0 commit comments

Comments
 (0)