Steffen Daode Nurpmeso <sdao...@googlemail.com> added the comment: 11:12 ~/tmp $ python3 ~/usr/opt/py3k/lib/python3.3/test_zlib.py Bus error
Your code snippet: 11:21 ~/tmp $ /usr/bin/time -lp python3 test.py posix.stat_result(st_mode=33184, st_ino=10066605, st_dev=234881025, st_nlink=1, st_uid=502, st_gid=20, st_size=4294967300, st_atime=1298715813, st_mtime=1298715813, st_ctime=1298715813) posix.stat_result(st_mode=33184, st_ino=10066605, st_dev=234881025, st_nlink=1, st_uid=502, st_gid=20, st_size=4294967300, st_atime=1298715813, st_mtime=1298715813, st_ctime=1298715813) real 71.66 user 0.06 sys 3.71 0 maximum resident set size 0 average shared memory size 0 average unshared data size 0 average unshared stack size 0 page reclaims 0 page faults 0 swaps 0 block input operations 57 block output operations 0 messages sent 0 messages received 0 signals received 2112 voluntary context switches 0 involuntary context switches On Fri, Feb 25, 2011 at 05:05:19PM +0000, Charles-Francois Natali wrote: > >Charles-Francois Natali <neolo...@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 <rep...@bugs.python.org> ><http://bugs.python.org/issue11277> >_______________________________________ ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11277> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com