classification
Title: mmap segfaults when trying to write a block opened with PROT_READ
Type: crash Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: loewis Nosy List: christian.heimes, loewis, therve
Priority: high Keywords:

Created on 2008-02-14 14:40 by therve, last changed 2008-05-23 14:31 by loewis. This issue is now closed.

Files
File name Uploaded Description Edit
mmap.diff therve, 2008-02-14 14:40
Messages (3)
msg62390 - (view) Author: Thomas Herve (therve) * Date: 2008-02-14 14:40
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.
msg62424 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2008-02-15 08:21
Fixed in r60830 (trunk)

Martin, is the fix a candidate for 2.5.3, too?
msg67242 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008-05-23 14:31
Committed to 2.5 as r63561
History
Date User Action Args
2008-05-23 14:31:51loewissetstatus: pending -> closed
messages: + msg67242
2008-02-15 08:21:03christian.heimessetstatus: open -> pending
versions: + Python 2.5, - Python 2.6
nosy: + loewis, christian.heimes
messages: + msg62424
priority: high
assignee: loewis
resolution: accepted
2008-02-14 14:40:03thervecreate