[issue5282] mmap.resize and offset

2009-02-17 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I hope this is obvious too. Fixed in r69718. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue5282] mmap.resize and offset

2009-02-17 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Here is a patch. -- keywords: +patch Added file: http://bugs.python.org/file13117/fix_offset_and_resize.patch ___ Python tracker ___

[issue5282] mmap.resize and offset

2009-02-16 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I investigated more. Following code crashed with bus error on coLinux. import mmap def main(): align = mmap.ALLOCATIONGRANULARITY with open("a.txt", "w") as f: f.write("0" * align) f.write("1" * align) f.write("2" * align)

[issue5282] mmap.resize and offset

2009-02-16 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Yes, I noticed this issue while investigating issue2733. But sorry, I couldn't reproduce the bug on my machine. Even so, LPDWORD arg for SetPointer can be modified, so your patch looks correct. (There is SetPointerEx which can make the code simpler, but this

[issue5282] mmap.resize and offset

2009-02-16 Thread Tim Golden
Tim Golden added the comment: Have a look at issue 2733 http://bugs.python.org/issue2733 where I've just proposed a patch in this area. I'm also not sure exactly what's going on, but I have patched what I believe is a linked pair of bugs in that code. -- nosy: +tim.golden _

[issue5282] mmap.resize and offset

2009-02-16 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : This is first time to look at mmap module, so sorry if I'm saying totally wrong thing. (I noticed this when I saw issue2733) I think the behavior of mmap_resize_method is unclear when mapping object is created with offset > 0. >From view of other functions