Skip to content

Commit c1f81bf

Browse files
committed
Add STATUS_ACCESS_VIOLATION for Windows exitcode
1 parent c8f65f5 commit c1f81bf

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/test_invalid_holder_access.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,16 @@ def test_manual_new():
7979
)
8080
process.start()
8181
process.join()
82-
assert abs(process.exitcode) in (0, signal.SIGSEGV, signal.SIGABRT)
83-
if process.exitcode != 0:
82+
rc = abs(process.exitcode)
83+
if 128 <= rc < 256:
84+
rc -= 128
85+
assert rc in (
86+
0,
87+
signal.SIGSEGV,
88+
signal.SIGABRT,
89+
0xC0000005, # STATUS_ACCESS_VIOLATION on Windows
90+
)
91+
if rc != 0:
8492
raise SystemError(
8593
"Segmentation Fault: The C++ compiler initializes container incorrectly."
8694
)

0 commit comments

Comments
 (0)