Skip to content

Commit 284b376

Browse files
committed
Skip fpcast test in ubsan
1 parent f92edfe commit 284b376

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎Lib/test/test_capi/test_fpcast.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@
77
real signature. Calling each variant must work everywhere.
88
"""
99
import unittest
10-
from test.support import import_helper, is_wasm32
10+
from test.support import check_sanitizer, import_helper, is_wasm32
1111

1212
_testcapi = import_helper.import_module('_testcapi')
1313

1414

15+
# Native ABIs tolerate these calls but they are implementation-defined behavior.
16+
# -fsanitize=undefined correctly trips on them.
17+
@unittest.skipIf(check_sanitizer(ub=True),
18+
"calls through mis-cast function pointers are UB natively")
1519
class FpcastTest(unittest.TestCase):
1620
def check_calls(self, obj, prefix):
1721
for arity in range(4):

0 commit comments

Comments
 (0)