Message288825
The readline module causes memory corruption (sometimes a crash) when the sys.stdin file descriptor is out of bounds for its FD_SET() call within readline.c's readline_until_enter_or_signal() function.
https://github.com/python/cpython/blob/master/Modules/readline.c#L1228
A tiny program reproducing this problem is attached.
FD_SET should not be used if the file descriptor is too large for use in select() (ie: >= FD_SETSIZE). OTOH, we should probably just ditch select() entirely and use poll() here so that this issue does not exist.
On Python 2.7-3.6 we probably need to preserve both select and poll options for platform compatibility reasons since those shipped that way.
For Python 3.7 I suggest we stop supporting platforms that do not have poll() unless anyone knows of any that actually exist. |
|
Date |
User |
Action |
Args |
2017-03-02 19:48:15 | gregory.p.smith | set | recipients:
+ gregory.p.smith |
2017-03-02 19:48:15 | gregory.p.smith | set | messageid: <1488484095.89.0.988668664064.issue29700@psf.upfronthosting.co.za> |
2017-03-02 19:48:15 | gregory.p.smith | link | issue29700 messages |
2017-03-02 19:48:15 | gregory.p.smith | create | |
|