[New-bugs-announce] [issue31719] [2.7] test_regrtest.test_crashed() fails on s390x

STINNER Victor report at bugs.python.org
Fri Oct 6 16:35:01 EDT 2017


New submission from STINNER Victor <victor.stinner at gmail.com>:

On the s390x architecture, the test_regrtest.test_crashed() fails because Python doesn't crash.

test.support._crash_python() calls ctypes.string_at(0) to crash Python. In debug mode, ctypes.string_at(0) fails with an assertion error and the process is killed with the SIGABRT signal. In release mode, ctypes.string_at(0) returns an empty string but doesn't crash.

Attached PR adds a new _testcapi._read_null() function which does crash in a reliable way on s390x and x86 :-) The function uses the C "volatile" keyword to prevent compiler optimizations. I copied the code from my faulthandler._read_null() function in the master branch which was battle tested. It does crash on all platforms... except of AIX.

----------
components: Tests
messages: 303854
nosy: haypo
priority: normal
severity: normal
status: open
title: [2.7] test_regrtest.test_crashed() fails on s390x
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31719>
_______________________________________


More information about the New-bugs-announce mailing list