New submission from Stefan Behnel <sco...@users.sourceforge.net>: Running the Cython compiler under Python 3.1.1 and 3.2 (SVN) corrupts PyThreadState->exc_value by leaving a dead reference. Printing the value then leads to a crash.
This bug is about plain Python code, no Cython built extension modules involved. Steps to reproduce the problem: - get Cython from http://hg.cython.org/cython-devel (see the bz2/zip/gz links on the left to get an archive without doing a checkout) - apply the attached patch, which simply prints sys.exc_info() during the compiler run at a place where it's known to be corrupted - execute the following to run a single test in the test suite: python3.1 runtests.py --no-cpp --no-pyregr --no-doctest -vv \ 'compile\.first_assignment' - expect a crash after printing "HERE1" Before exc_info gets corrupted, we make heavy use of generators to traverse the parse tree (see Cython/Compiler/TreePath.py), while being inside of a recursive traversal of the tree already (see the "VisitorTransform" class and its base class in Cython/Compiler/Visitor.py). The code section that links the two is in the class "TreeAssertVisitor" at the end of Cython/TestUtils.py, where the patch applies. As exc_info doesn't get corrupted during the normal recursive tree transformation traversals before that, the generator usage in TreePath.py is likely related to the crash. The crash was found and reproduced under two different Linux x86 systems. ---------- components: Interpreter Core files: crash-patch.patch keywords: patch messages: 94268 nosy: scoder severity: normal status: open title: Cython compiler run crashes CPython 3.1.1 and 3.2 type: crash versions: Python 3.1, Python 3.2 Added file: http://bugs.python.org/file15168/crash-patch.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7173> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com