New submission from Hirokazu Yamamoto <[email protected]>:
I noticed following code crashes. I'll post fix soon.
import mmap
import os
def main():
align = mmap.ALLOCATIONGRANULARITY
path = os.path.splitext(__file__)[0] + ".txt"
with open(path, "w") as f:
f.write("0" * align)
f.write("1" * align)
f.write("2" * align)
with open(path, "r+") as f:
m = mmap.mmap(f.fileno(), align)
m[align] # crash
m[align] = '1' # crash too
if __name__ == '__main__':
main()
----------
components: Extension Modules
messages: 82307
nosy: ocean-city
severity: normal
status: open
title: mmap crashes just on boundary.
type: crash
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue5292>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com