[issue29700] readline memory corruption when sys.stdin fd >= FD_SETSIZE for select()

2017-04-30 Thread Marien Zwart
Marien Zwart added the comment: GNU readline 7.0 introduces the problematic use of pselect(). GNU readline 6.3 is unaffected (and presumably older versions as well). I didn't check other implementations. I'll see if I can get this fixed in GNU readline. The non-select code is st

[issue29700] readline memory corruption when sys.stdin fd >= FD_SETSIZE for select()

2017-03-07 Thread Marien Zwart
Changes by Marien Zwart : -- pull_requests: +448 ___ Python tracker <http://bugs.python.org/issue29700> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29700] readline memory corruption when sys.stdin fd >= FD_SETSIZE for select()

2017-03-06 Thread Marien Zwart
Marien Zwart added the comment: On Python 3, crash_readline_fdset.py does not crash for me, because its input() contains a check documented as: /* We should only use (GNU) readline if Python's sys.stdin and sys.stdout are the same as C's stdin and stdout,

[issue29700] readline memory corruption when sys.stdin fd >= FD_SETSIZE for select()

2017-03-06 Thread Marien Zwart
Changes by Marien Zwart : -- nosy: +marienz ___ Python tracker <http://bugs.python.org/issue29700> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26310] Fix typo “variariables” in socketserver.py

2016-02-08 Thread Marien
New submission from Marien: This patch fixes a typo in socketserver.py -- assignee: docs@python components: Documentation files: fix-typo-variariables.patch keywords: patch messages: 259869 nosy: docs@python, marienfr priority: normal severity: normal status: open title: Fix typo

[issue23309] Hang on interpreter shutdown if daemon thread prints to stdout

2015-03-09 Thread Marien Zwart
Marien Zwart added the comment: I'm afraid I don't have real-world code I can confirm is fixed, since I reported this on behalf of someone on irc in #python. I think I'd prefer the Py_FatalError version of the patch. It's definitely possible to see writes to stdout/stder

[issue23309] Hang on interpreter shutdown if daemon thread prints to stdout

2015-01-24 Thread Marien Zwart
New submission from Marien Zwart: A script spawning a single daemon thread calling print() in a loop (like the attached) will usually hang on shutdown in Python 3.4.2 and hg rev 8d802fb6ae32. Attaching gdb at that point shows the following: (gdb) thread apply all bt Thread 1 (Thread

[issue13007] gdbm 1.9 has new magic that whichdb does not recognize

2011-09-19 Thread Marien Zwart
New submission from Marien Zwart : dbm.whichdb (python 3) and whichdb.whichdb (python 2) only check for "magic == 0x13579ace" to recognize gdbm databases. The recently released gdbm 1.9 series adds 0x13579acd (for "32bit") and 0x13579acf (for "64bit") magics (se

[issue9985] difflib.SequenceMatcher has slightly buggy and undocumented caching behavior

2010-10-01 Thread Marien Zwart
Marien Zwart added the comment: That fixes the first problem in python 2. It should do: self.matching_blocks = [Match._make(t) for t in non_adjacent] in python 3 though, or it will return an already-exhausted map object if it is called again. This leaves the problem of other code mutating

[issue9985] difflib.SequenceMatcher has slightly buggy and undocumented caching behavior

2010-09-29 Thread Marien Zwart
New submission from Marien Zwart : SequenceMatcher caches the result of get_matching_blocks and get_opcodes. There are some problems with this: What get_matching_blocks caches is a list of tuples. The first call does not return that list: it returns map(Match._make, self.matching_blocks

[issue8652] Minor improvements to the "Handling Exceptions" part of the tutorial

2010-09-12 Thread Marien Zwart
Marien Zwart added the comment: Sorry for forgetting about this for so long. The attached patch makes the following changes: Removes the two instances I noticed of treating exception instances as sequences. This no longer works in python 3 and is not very useful in python 2, so best avoided

[issue8652] Minor improvements to the "Handling Exceptions" part of the tutorial

2010-05-07 Thread Marien Zwart
New submission from Marien Zwart : Based on questions asked on freenode's #python by people reading the tutorial I would like to suggest two improvements to http://docs.python.org/tutorial/errors.html#handling-exceptions : - Mention the older "except SomeException, e:" synta

[issue7336] threading module not properly handling shutdown

2009-11-16 Thread Marien Zwart
Changes by Marien Zwart : -- nosy: +marienz ___ Python tracker <http://bugs.python.org/issue7336> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6944] socket.getnameinfo raises SystemError on bogus input

2009-09-18 Thread Marien Zwart
Marien Zwart added the comment: Attaching a less broken patch, after Taggnostr pointed out on irc that the code I removed is not actually dead. I really don't know why I thought it was. I did take the opportunity to make it more obvious what that code is actually checking for. --

[issue6944] socket.getnameinfo raises SystemError on bogus input

2009-09-18 Thread Marien Zwart
New submission from Marien Zwart : socket.getnameinfo passes a PyObject* to PyArg_ParseTuple without checking if it's a tuple first. That means it raises SystemError on invalid input where TypeError would make more sense: >>> socket.getnameinfo('localhost', 0) System