[issue2111] mmap segfaults when trying to write a block opened with PROT_READ

Thomas Herve report at bugs.python.org
Thu Feb 14 15:40:04 CET 2008


New submission from Thomas Herve:

Basically, the write method of mmap objects check the state with
is_writable, which check the writability with the access attributes. But
the mmap object can be opened correctly specifying the rights with
prot=mmap.PROt_READ.

Attached patch corrects the problem by setting access to ACCESS_READ
with prot is set to PROT_READ, with a test.

----------
components: Library (Lib)
files: mmap.diff
messages: 62390
nosy: therve
severity: normal
status: open
title: mmap segfaults when trying to write a block opened with PROT_READ
type: crash
versions: Python 2.6
Added file: http://bugs.python.org/file9429/mmap.diff

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2111>
__________________________________


More information about the Python-bugs-list mailing list