Message129391
| Author |
neologix |
| Recipients |
brett.cannon, ixokai, ned.deily, neologix, pitrou, sdaoden, vstinner |
| Date |
2011年02月25日.17:05:18 |
| SpamBayes Score |
9.2534873e-07 |
| Marked as misclassified |
No |
| Message-id |
<AANLkTimiG2bTumkvNbcWpcRJeVQHyS_Uc8pYBKFGMmXT@mail.gmail.com> |
| In-reply-to |
<1298465075.02.0.266967052498.issue11277@psf.upfronthosting.co.za> |
| Content |
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 ! |
|