[issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key()

STINNER Victor report at bugs.python.org
Thu Nov 28 02:29:49 CET 2013


STINNER Victor added the comment:

I ran test_tracemalloc on Linux and Windows and the test passed successfully.

It should probably be better to split the patch in two parts if the idea of changing Python/thread* files is accepted. (But initially, the issue comes from the tracemalloc module.)

set_reentrant() of tracemalloc.c:

+        assert(PyThread_get_key_value(tracemalloc_reentrant_key) == REENTRANT);

I also added a new assertion to ensure that set_reentrant(0) was not called twice. It was a suggesed of Jim Jewett.

This is unrelated to this issue and should be commited separatly.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19787>
_______________________________________


More information about the Python-bugs-list mailing list