From: Victor Stinner Date: Wed, 3 Jul 2013 20:29:42 +0000 (+0200) Subject: test_faulthandler: skip test_read_null() on AIX X-Git-Tag: v3.4.0a1~338^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=330426cfe268a3ccaaf2baa20e0d1d37b0312c40;p=thirdparty%2FPython%2Fcpython.git test_faulthandler: skip test_read_null() on AIX AIX maps the first page of memory at address zero as valid, read-only. Reading NULL is not a fault on AIX. This is utilized by IBM compiler optimizations. One speculatively can indirect through a pointer which may be null without first testing if null and defer the test before using the value. --- diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py index 5afc7cca2295..770e70c77d3c 100644 --- a/Lib/test/test_faulthandler.py +++ b/Lib/test/test_faulthandler.py @@ -107,6 +107,8 @@ class FaultHandlerTests(unittest.TestCase): self.assertRegex(output, regex) self.assertNotEqual(exitcode, 0) + @unittest.skipIf(sys.platform.startswith('aix'), + "the first page of memory is a mapped read-only on AIX") def test_read_null(self): self.check_fatal_error(""" import faulthandler