ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-list
python-list
Bus error when using mmap
by Roman Suzi other posts by this author
Sep 25 2001 3:10PM messages near this date
Pymacs 0.8 | Re: doing tricks with refcounts
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@[...].ru _/
_/ Tuesday, September 25, 2001 _/ Powered by Linux RedHat 6.2 _/
_/ ""How to Catch Worms" by Earl E. Bird" _/




-- 
http://mail.python.org/mailman/listinfo/python-list

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved