Bus error when using mmap
Roman Suzi
rnd at onego.ru
Tue Sep 25 11:10:58 EDT 2001
When trying to write beyond EOF (of original file) in mapping of mmap I
receive BUS ERROR. Interpreter just quits. While it is understandable,
maybe some safety checks could be done in mmap methods to prevent such
unstable behaviour?
This is offending piece:
Python 2.1 (#1, Sep 24 2001, 23:22:13)
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> import mmap
>>> f = open("eee", "w+") # !!! zero size, should be "r+", but:
>>> mm = mmap.mmap(f.fileno(), 100)
>>> mm[0:10] = "*"*10
Bus error
Sincerely yours, Roman Suzi
--
_/ Russia _/ Karelia _/ Petrozavodsk _/ rnd at onego.ru _/
_/ Tuesday, September 25, 2001 _/ Powered by Linux RedHat 6.2 _/
_/ ""How to Catch Worms" by Earl E. Bird" _/
More information about the Python-list
mailing list