Message100774
Creating an mmap object can crash the interpreter on Windows if a file descriptor is passed in which is outside of the range for _get_osfhandle. I noticed the crash possibility while reviewing the Modules/mmapmodule.c code for work on another issue related to the consistency of the exceptions which mmap raises.
This can be tested by creating a mmap object with the file descriptor for a socket. This is not a valid way to create an mmap, but it represents a valid file descriptor which is out of range. For example, I created a socket with a file descriptor of 124, and _get_osfhandle expects the descriptor to be between 0 and 23.
Patch against trunk, with a test.
Note that this does not seem to affect 2.6 (not sure why, yet). |
|
Date |
User |
Action |
Args |
2010-03-10 00:42:26 | brian.curtin | set | recipients:
+ brian.curtin |
2010-03-10 00:42:25 | brian.curtin | set | messageid: <1268181745.97.0.225501329213.issue8105@psf.upfronthosting.co.za> |
2010-03-10 00:42:24 | brian.curtin | link | issue8105 messages |
2010-03-10 00:42:24 | brian.curtin | create | |
|