Author brian.curtin
Recipients brian.curtin
Date 2010-03-10.00:42:23
SpamBayes Score 4.53511e-07
Marked as misclassified No
Message-id <>
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:26brian.curtinsetrecipients: + brian.curtin
2010-03-10 00:42:25brian.curtinsetmessageid: <>
2010-03-10 00:42:24brian.curtinlinkissue8105 messages
2010-03-10 00:42:24brian.curtincreate