Skip to content

Commit 41d1ce7

Browse files
committed
ci: try more chaos
1 parent 69ac108 commit 41d1ce7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cuda_core/tests/test_event.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ def test_event_init_disabled():
3131
def test_intentional_segfault():
3232
import ctypes
3333

34-
ctypes.pythonapi.Py_IncRef(1)
34+
# Corrupt Python's object structure
35+
obj = object()
36+
ptr = id(obj)
37+
ctypes.memset(ptr, 0, 48) # Overwrite object's memory
38+
# Next operation will likely crash
39+
print(obj)
3540

3641

3742
def test_timing_success(init_cuda):

0 commit comments

Comments
 (0)