]> granicus.if.org Git - python/commit
Fix segfaults when running test_exceptions with coverage tracing, caused by wrongly...
authorGeorg Brandl <georg@python.org>
Tue, 31 Mar 2009 04:16:10 +0000 (04:16 +0000)
committerGeorg Brandl <georg@python.org>
Tue, 31 Mar 2009 04:16:10 +0000 (04:16 +0000)
commitab6f2f6eb680c40750f05de4bc7cf8964b733b74
tree77f3d4c83191b1cc077683af03a94681ce917cdb
parent71095ea4ce1b8584d89047f2256b183d40cc9d35
Fix segfaults when running test_exceptions with coverage tracing, caused by wrongly defining Exception.__context__ as a T_OBJECT structmember which does not set the member to NULL on None assignment, and generally does not do type checks. This could be used to crash the interpreter by setting any object to __context__. The same applies to __cause__.  Also document the PyException_* functions.
Doc/c-api/exceptions.rst
Lib/test/test_exceptions.py
Misc/NEWS
Objects/exceptions.c