[Python-checkins] cpython (merge 3.3 -> default): (Merge 3.3) test_faulthandler: skip test_read_null() on AIX

victor.stinner python-checkins at python.org
Wed Jul 3 22:37:11 CEST 2013


http://hg.python.org/cpython/rev/eea9680599a1
changeset:   84435:eea9680599a1
parent:      84433:8e838598eed1
parent:      84434:217535af4567
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Wed Jul 03 22:35:39 2013 +0200
summary:
  (Merge 3.3) 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.

files:
  Lib/test/test_faulthandler.py |  2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py
--- a/Lib/test/test_faulthandler.py
+++ b/Lib/test/test_faulthandler.py
@@ -107,6 +107,8 @@
         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

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list