Skip to content

Commit d7f3529

Browse files
authored
[compiler-rt] Disable test due to Linux kernel bug (#18232)
It does not affect machines without LA57 enabled or updated kernel. --------- Signed-off-by: Wu, Yingcong <[email protected]>
1 parent 647d973 commit d7f3529

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

compiler-rt/test/sanitizer_common/TestCases/Linux/pie_no_aslr.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
// There is a bug with Linux kernel with la57
2+
// https://lore.kernel.org/all/[email protected]/ ,
3+
// some of our machines are still affected, disable this test for now.
4+
// UNSUPPORTED: tsan && la57
5+
16
// RUN: %clangxx %s -pie -fPIE -o %t && %run setarch x86_64 -R %t
27
// REQUIRES: x86_64-target-arch
38

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

+12
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,15 @@ def build_invocation(compile_flags):
103103

104104
if os.path.exists("/etc/services"):
105105
config.available_features.add("netbase")
106+
107+
# Add detection for 5-level paging, some testes may fail with that.
108+
# LA57 is the control register flag name for 5-level paging.
109+
import subprocess
110+
111+
cmd = subprocess.Popen(
112+
"lscpu | grep la57", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE
113+
)
114+
cmd_stdout, _ = cmd.communicate()
115+
have_la57 = cmd_stdout.strip()
116+
if len(have_la57) > 0:
117+
config.available_features.add("la57")

0 commit comments

Comments
 (0)