[Patches] fix mmap module (borken seek, 64-bit stuff, overflows)

Trent Mick trentm@activestate.com
Thu, 1 Jun 2000 20:15:32 -0700

On Thu, Jun 01, 2000 at 08:02:08PM -0700, Trent Mick wrote:
>   This patch fixes that,
>   checks for possible out of range seek values, and extends test_mmap.py =
>   test this stuff.

Oops, forgot to add the changes to Lib/test/output/test_mmap, without which
test_mmap.py fails on comparison. Here it is:


*** /home/trentm/main/contrib/python/dist/src/Lib/test/output/test_mmap	Thu=
 Jun  1 00:13:38 2000
--- /home/trentm/main/Apps/Perlium/Python/dist/src/Lib/test/output/test_mma=
p	Wed May 31 23:54:16 2000
*** 9,12 ****
--- 9,18 ----
    Contents of first 3 bytes: '3\000\000'
    Contents of second page: =00foobar=00
    Regex match on mmap (page start, length of match): 1.0 6
+   Seek to zeroth byte
+   Seek to 42nd byte
+   Seek to last byte
+   Try to seek to negative position...
+   Try to seek beyond end of mmap...
+   Try to seek to negative position...
   Test passed


I confirm that, to the best of my knowledge and belief, this
contribution is free of any claims of third parties under
copyright, patent or other rights or interests ("claims").  To
the extent that I have any such claims, I hereby grant to CNRI a
nonexclusive, irrevocable, royalty-free, worldwide license to
reproduce, distribute, perform and/or display publicly, prepare
derivative versions, and otherwise use this contribution as part
of the Python software and its related documentation, or any
derivative versions thereof, at no cost to CNRI or its licensed
users, and to authorize others to do so.

I acknowledge that CNRI may, at its sole discretion, decide
whether or not to incorporate this contribution in the Python
software and its related documentation.  I further grant CNRI
permission to use my name and other identifying information
provided to CNRI by me for use in connection with the Python
software and its related documentation.

Trent Mick