]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.6] bpo-30604: Move co_extra_freefuncs to interpreter state to avoid crashes in...
authorDino Viehland <dinov@microsoft.com>
Tue, 13 Jun 2017 01:46:35 +0000 (18:46 -0700)
committerNed Deily <nad@python.org>
Tue, 13 Jun 2017 01:46:35 +0000 (21:46 -0400)
commit2997fec01ee7300c6d5940e6c55e4ccf9f56f1b5
tree4564d8aaf56739653666c834f29028b918f97173
parentf59cac4b6458e5c47e24a39ba46fb178c3766577
[3.6] bpo-30604: Move co_extra_freefuncs to interpreter state to avoid crashes in threads (#2015)

* Move co_extra_freefuncs to interpreter state to avoid crashes in
multi-threaded scenarios involving deletion of code objects

* Don't require that extra be zero initialized

* Build test list instead of defining empty test class

* Ensure extra is always assigned on success

* Keep the old fields in the thread state object, just don't use them
Add new linked list of code extra objects on a per-interpreter basis
  so that interpreter state size isn't changed

* Rename __PyCodeExtraState_Get and add comment about it going away in 3.7
Fix sort order of import's in test_code.py

* Remove an extraneous space

* Remove docstrings for comments

* Touch up formatting

* Fix casing of coextra local

* Fix casing of another variable

* Prefix PyCodeExtraState with __ to match C API for getting it

* Update NEWS file for bpo-30604
Include/pystate.h
Lib/test/test_code.py
Misc/NEWS
Objects/codeobject.c
Python/ceval.c
Python/pystate.c