Skip to content

Commit 31f36de

Browse files
committed
skip a test on free-threaded builds to avoid crash
1 parent d6f3bc4 commit 31f36de

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Lib/test/test_generators.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,11 @@ def f(): yield
285285
evil_stacksize = int(_testcapi.INT_MAX / ps - fss - co_nlocalsplus)
286286

287287
evil = c.__replace__(co_stacksize=evil_stacksize - 1)
288-
evil_gi = types.FunctionType(evil, {})()
288+
289+
if support.Py_GIL_DISABLED:
290+
self.skipTest("segmentation fault on free-threaded builds")
291+
# the following crashes on free-threaded builds for now
292+
evil_gi_func = types.FunctionType(evil, {})()
289293
message = re.escape("size exceeds INT_MAX")
290294
self.assertRaisesRegex(OverflowError, message, evil_gi.__sizeof__)
291295

0 commit comments

Comments
 (0)