Author gregory.p.smith
Recipients gregory.p.smith
Date 2017-03-02.19:48:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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.

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:15gregory.p.smithsetrecipients: + gregory.p.smith
2017-03-02 19:48:15gregory.p.smithsetmessageid: <>
2017-03-02 19:48:15gregory.p.smithlinkissue29700 messages
2017-03-02 19:48:15gregory.p.smithcreate