3333CURRENT_THREAD_HEADER = fr'{ CURRENT_THREAD_ID } \(most recent call first\):'
3434
3535
36+ def skip_if_sanitizer_signal (signame ):
37+ return support .skip_if_sanitizer (f"TSAN/UBSan itercepts { signame } " ,
38+ thread = True , ub = True )
39+
40+
3641def expected_traceback (lineno1 , lineno2 , header , min_count = 1 ):
3742 regex = header
3843 regex += ' File "<string>", line %s in func\n ' % lineno1
@@ -224,7 +229,7 @@ def test_fatal_error_c_thread(self):
224229 func = 'faulthandler_fatal_error_thread' ,
225230 py_fatal_error = True )
226231
227- @support . skip_if_sanitizer ( "TSAN itercepts SIGABRT", thread = True )
232+ @skip_if_sanitizer_signal ( " SIGABRT" )
228233 def test_sigabrt (self ):
229234 self .check_fatal_error ("""
230235 import faulthandler
@@ -236,7 +241,7 @@ def test_sigabrt(self):
236241
237242 @unittest .skipIf (sys .platform == 'win32' ,
238243 "SIGFPE cannot be caught on Windows" )
239- @support . skip_if_sanitizer ( "TSAN itercepts SIGFPE", thread = True )
244+ @skip_if_sanitizer_signal ( " SIGFPE" )
240245 def test_sigfpe (self ):
241246 self .check_fatal_error ("""
242247 import faulthandler
@@ -248,7 +253,7 @@ def test_sigfpe(self):
248253
249254 @unittest .skipIf (_testcapi is None , 'need _testcapi' )
250255 @unittest .skipUnless (hasattr (signal , 'SIGBUS' ), 'need signal.SIGBUS' )
251- @support . skip_if_sanitizer ( "TSAN itercepts SIGBUS", thread = True )
256+ @skip_if_sanitizer_signal ( " SIGBUS" )
252257 @skip_segfault_on_android
253258 def test_sigbus (self ):
254259 self .check_fatal_error ("""
@@ -263,7 +268,7 @@ def test_sigbus(self):
263268
264269 @unittest .skipIf (_testcapi is None , 'need _testcapi' )
265270 @unittest .skipUnless (hasattr (signal , 'SIGILL' ), 'need signal.SIGILL' )
266- @support . skip_if_sanitizer ( "TSAN itercepts SIGILL", thread = True )
271+ @skip_if_sanitizer_signal ( " SIGILL" )
267272 @skip_segfault_on_android
268273 def test_sigill (self ):
269274 self .check_fatal_error ("""
0 commit comments