Skip to content

Commit c3038be

Browse files
[3.12] gh-109580: Skip test_perf_profiler on ASAN build (GH-109584) (#109585)
gh-109580: Skip test_perf_profiler on ASAN build (GH-109584) Skip test_perf_profiler if Python is built with ASAN, MSAN or UBSAN sanitizer. Python does crash randomly in this test on such build. (cherry picked from commit 754519a) Co-authored-by: Victor Stinner <[email protected]>
1 parent ddc0adc commit c3038be

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Lib/test/test_perf_profiler.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
if not support.has_subprocess_support:
1818
raise unittest.SkipTest("test module requires subprocess")
1919

20+
if support.check_sanitizer(address=True, memory=True, ub=True):
21+
# gh-109580: Skip the test because it does crash randomly if Python is
22+
# built with ASAN.
23+
raise unittest.SkipTest("test crash randomly on ASAN/MSAN/UBSAN build")
24+
2025

2126
def supports_trampoline_profiling():
2227
perf_trampoline = sysconfig.get_config_var("PY_HAVE_PERF_TRAMPOLINE")
@@ -287,7 +292,6 @@ def run_perf(cwd, *args, **env_vars):
287292

288293
@unittest.skipUnless(perf_command_works(), "perf command doesn't work")
289294
@unittest.skipUnless(is_unwinding_reliable(), "Unwinding is unreliable")
290-
@support.skip_if_sanitizer(address=True, memory=True, ub=True)
291295
class TestPerfProfiler(unittest.TestCase):
292296
def setUp(self):
293297
super().setUp()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Skip ``test_perf_profiler`` if Python is built with ASAN, MSAN or UBSAN
2+
sanitizer. Python does crash randomly in this test on such build. Patch by
3+
Victor Stinner.

0 commit comments

Comments
 (0)