[issue5387] mmap.move crashes by integer overflow

2009-03-31 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I've committed your test with some modification. (r70879) Thanks! -- ___ Python tracker ___ ___ P

[issue5387] mmap.move crashes by integer overflow

2009-03-31 Thread Jack Diederich
Jack Diederich added the comment: Looks good. Attached is a more thorough test_mmap.py patch that would have found the bugs in both our patches ;) -- resolution: -> fixed status: open -> closed Added file: http://bugs.python.org/file13522/test_mmap_harder.patch __

[issue5387] mmap.move crashes by integer overflow

2009-03-31 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Yes, you are right... My patch was not correct neigher. :-( Here is revised patch. -- resolution: fixed -> status: closed -> open Added file: http://bugs.python.org/file13519/fix_mmap_move_v2.patch ___ Python tra

[issue5387] mmap.move crashes by integer overflow

2009-03-31 Thread Jack Diederich
Jack Diederich added the comment: running a fresh 2.7 trunk >>> a >>> a.move(-1, -1, -1 ... ) Segmentation fault j...@sprat:~/src/python-rw$ ./python Python 2.7a0 (trunk:70847M, Mar 31 2009, 14:14:31) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information.

[issue5387] mmap.move crashes by integer overflow

2009-03-31 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Committed in r70800(trunk), r70803(release26-maint), r70808(py3k), r70811(release30-maint). -- resolution: -> fixed status: open -> closed ___ Python tracker __

[issue5387] mmap.move crashes by integer overflow

2009-03-31 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Well, I think your patch has some issues. >>> import mmap >>> m = mmap.mmap(-1, 10) >>> m.move(10, 10, 0) # legal, should not fail Traceback (most recent call last): File "", line 1, in ValueError: source out of range >>> m.move(9, 9, -1) # should not cra

[issue5387] mmap.move crashes by integer overflow

2009-03-26 Thread Jack Diederich
Jack Diederich added the comment: Here is a more verbose patch. It checks to see if the first two arguments stand-alone as well. It also updates NEWS and ACKs and adds some assertRaises for various bounds checks. -- nosy: +jackdied Added file: http://bugs.python.org/file13423/issue_53

[issue5387] mmap.move crashes by integer overflow

2009-03-08 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I tried r69943 on coLinux, and I got compile error "max is not defined". Here is updated patch. -- keywords: +patch message_count: 1.0 -> 2.0 Added file: http://bugs.python.org/file13272/fix_mmap_move.patch ___ Py

[issue5387] mmap.move crashes by integer overflow

2009-02-27 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : mmap.move crashes by integer overflow. See http://www.nabble.com/Segv-in-mmap.move()-td18617044.html import mmap data = mmap.mmap(-1, 1) data.move(1,1,-1) # crash Maybe mmap.move should use Py_ssize_t and raise IndexError(OverflowError?) for negative valu