[issue5292] mmap crashes just on boundary.

Hirokazu Yamamoto report at bugs.python.org
Tue Feb 17 10:35:57 CET 2009


New submission from Hirokazu Yamamoto <ocean-city at m2.ccsnet.ne.jp>:

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 <report at bugs.python.org>
<http://bugs.python.org/issue5292>
_______________________________________


More information about the Python-bugs-list mailing list