[issue21073] Py_ReprEnter potentially misbehaves during malformed thread states

2014-03-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, I've now added a comment. -- resolution: -> rejected stage: -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue21073] Py_ReprEnter potentially misbehaves during malformed thread states

2014-03-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset c42cce290d50 by Antoine Pitrou in branch '3.4': Issue #21073: explain why Py_ReprEnter() allows for a missing thread state. http://hg.python.org/cpython/rev/c42cce290d50 New changeset fb217fc457ca by Antoine Pitrou in branch 'default': Issue #21073:

[issue21073] Py_ReprEnter potentially misbehaves during malformed thread states

2014-03-27 Thread Guido van Rossum
Guido van Rossum added the comment: No, I haven't changed my mind. Feel free to add a comment explaining this. :-) -- ___ Python tracker ___ _

[issue21073] Py_ReprEnter potentially misbehaves during malformed thread states

2014-03-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: (but you're right, we could add a comment explaining this) -- ___ Python tracker ___ ___ Python-bugs

[issue21073] Py_ReprEnter potentially misbehaves during malformed thread states

2014-03-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: "hg annotate" shows it dates back to 4f0b7acffc7d by Guido, with the following diff: diff --git a/Misc/NEWS b/Misc/NEWS --- a/Misc/NEWS +++ b/Misc/NEWS @@ -150,6 +150,10 @@ C API - +- PyThreadState_GetDict() was changed not to raise an exception or + i

[issue21073] Py_ReprEnter potentially misbehaves during malformed thread states

2014-03-26 Thread Itai Bar-Natan
New submission from Itai Bar-Natan: While browsing the Python source code, I found this suspicious snippet in Py_ReprEnter: dict = PyThreadState_GetDict(); if (dict == NULL) return 0; It seems to me like the last line should be "return -1;". The way the program currently behav