[New-bugs-announce] [issue10916] mmap segfault

Ross Lagerwall report at bugs.python.org
Sat Jan 15 16:19:02 CET 2011

New submission from Ross Lagerwall <rosslagerwall at gmail.com>:

If a mmap length 0 is used and an offset is used as well, the size to mmap() is calculated as the size of the file instead of the size of the file minus offset. This means that trying to access a certain part does not result in an index error but a segfault (bus error).

Attached is a patch that fixes the issue + a unit test.

components: Extension Modules
files: mmap.patch
keywords: patch
messages: 126334
nosy: amaury.forgeotdarc, loewis, pitrou, r.david.murray, rosslagerwall
priority: normal
severity: normal
status: open
title: mmap segfault
type: crash
versions: Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file20415/mmap.patch

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list