]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
test_faulthandler: skip test_read_null() on AIX
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 3 Jul 2013 20:29:42 +0000 (22:29 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 3 Jul 2013 20:29:42 +0000 (22:29 +0200)
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.

Lib/test/test_faulthandler.py

index 5afc7cca229539e58c307a2fe5d7fb3d32bd4eac..770e70c77d3c049a16e8215703e9bf3ac2952fea 100644 (file)
@@ -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