Skip to content

Commit 299541a

Browse files
committed
Allow running QEMU tests with sanitizers
QEMU is not LSan clean so we need to suppress leak detection.
1 parent 19bd1ec commit 299541a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pycheribuild/projects/build_qemu.py

+3
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,9 @@ def setup(self):
315315

316316
if self.config.create_compilation_db:
317317
self.make_args.set(V=1) # Otherwise bear can't parse the compiler output
318+
if self.use_asan:
319+
# QEMU is not LeakSan clean, disable those checks.
320+
self.make_args.set_env(UBSAN_OPTIONS="print_stacktrace=1,halt_on_error=1", ASAN_OPTIONS="detect_leaks=0")
318321
ldflags = self.default_ldflags + self.LDFLAGS
319322
if ldflags:
320323
self.configure_args.append("--extra-ldflags=" + self.commandline_to_str(ldflags))

0 commit comments

Comments
 (0)