[issue11277] test_zlib crashes under Snow Leopard buildbot

Charles-Francois Natali report at bugs.python.org
Fri Feb 25 18:05:19 CET 2011


Charles-Francois Natali <neologix at free.fr> added the comment:

Could you try with this:

 def setUp(self):
          with open(support.TESTFN, "wb+") as f:
              f.seek(_4G)
              f.write(b"asdf")
              f.flush()
+            os.fsync(f.fileno())
              self.mapping = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)

HFS+ doesn't seem to support sparse files, so the file is actually
zero-filled asynchronously.
Maybe the mapping gets done before the blocks have been allocated,
which triggers a segfault when the first page is accessed.
I'm not sure it'll make any difference, but I'm curious...

Also, I'd be curious to see the result of

"""
import os

name = '/tmp/foo'
f = open(name, 'wb')
f.seek(1 << 32)
f.write(b'asdf')
f.flush()
print(os.fstat(f.fileno()))
f.close()
print(os.stat(name))
"""

Thanks !

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11277>
_______________________________________


More information about the Python-bugs-list mailing list