[issue11391] mmap write segfaults if PROT_WRITE bit is not set in prot

2011-03-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Merged in 92ab79ca4eeb, f9f9662dfb1f, 2e4468841c4c. Thank you! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 3.1 ___ Python tracker

[issue11391] mmap write segfaults if PROT_WRITE bit is not set in prot

2011-03-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Buildbot failure should be fixed in e3eaf7dbb2b4. -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue11391] mmap write segfaults if PROT_WRITE bit is not set in prot

2011-03-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Following error on the OpenIndiana buildbot: test test_mmap failed -- Traceback (most recent call last): File "/export/home/buildbot/32bits/3.1.cea-indiana-x86/build/Lib/test/test_mmap.py", line 242, in test_access_parameter m = mmap.mmap(f.fileno(), ma

[issue11391] mmap write segfaults if PROT_WRITE bit is not set in prot

2011-03-03 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: > Patch looks mostly good. Why do you use ~PROT_WRITE instead of > PROT_READ|PROT_EXEC as in your example? Because I'm not sure that PROT_EXEC is supported by all platforms. See http://pubs.opengroup.org/onlinepubs/007908799/xsh/mmap.html : "The imple

[issue11391] mmap write segfaults if PROT_WRITE bit is not set in prot

2011-03-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch looks mostly good. Why do you use ~PROT_WRITE instead of PROT_READ|PROT_EXEC as in your example? (I'm unsure whether a POSIX implementation could refuse such a value) -- nosy: +pitrou stage: -> patch review type: -> crash versions: +Python 2.7,

[issue11391] mmap write segfaults if PROT_WRITE bit is not set in prot

2011-03-03 Thread Charles-Francois Natali
New submission from Charles-Francois Natali : $ cat /tmp/test_mmap.py import mmap m = mmap.mmap(-1, 1024, prot=mmap.PROT_READ|mmap.PROT_EXEC) m[0] = 0 $ ./python /tmp/test_mmap.py Segmentation fault When trying to perform a write, is_writable is called to check that we can indeed write to th