This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brian.curtin
Recipients brian.curtin
Date 2010-03-10.00:42:23
SpamBayes Score 4.5351115e-07
Marked as misclassified No
Message-id <1268181745.97.0.225501329213.issue8105@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2010-03-10 00:42:26brian.curtinsetrecipients: + brian.curtin
2010-03-10 00:42:25brian.curtinsetmessageid: <1268181745.97.0.225501329213.issue8105@psf.upfronthosting.co.za>
2010-03-10 00:42:24brian.curtinlinkissue8105 messages
2010-03-10 00:42:24brian.curtincreate