<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Python/pystate.c, branch v3.7.13</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/'/>
<entry>
<title>bpo-20526: Fix PyThreadState_Clear(): don't decref frame (GH-19120) (GH-19136) (GH-19137)</title>
<updated>2020-03-24T16:56:01+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-03-24T16:56:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=d1c09896c3b91d0ad7e3a14fabecde268f70dac7'/>
<id>d1c09896c3b91d0ad7e3a14fabecde268f70dac7</id>
<content type='text'>
PyThreadState.frame is a borrowed reference, not a strong reference:
PyThreadState_Clear() must not call Py_CLEAR(tstate-&gt;frame).

Remove test_threading.test_warnings_at_exit(): we cannot warranty
that the Python thread state of daemon threads is cleared in a
reliable way during Python shutdown.

(cherry picked from commit 5804f878e779712e803be927ca8a6df389d82cdf)
(cherry picked from commit e97c8b0688bc62959ced477d842fcd37992ef649)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PyThreadState.frame is a borrowed reference, not a strong reference:
PyThreadState_Clear() must not call Py_CLEAR(tstate-&gt;frame).

Remove test_threading.test_warnings_at_exit(): we cannot warranty
that the Python thread state of daemon threads is cleared in a
reliable way during Python shutdown.

(cherry picked from commit 5804f878e779712e803be927ca8a6df389d82cdf)
(cherry picked from commit e97c8b0688bc62959ced477d842fcd37992ef649)</pre>
</div>
</content>
</entry>
<entry>
<title> bpo-39776: Lock ++interp-&gt;tstate_next_unique_id (GH-18746)</title>
<updated>2020-03-03T08:19:58+00:00</updated>
<author>
<name>Stefan Krah</name>
<email>skrah@bytereef.org</email>
</author>
<published>2020-03-03T08:19:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=852aee69f49c654a03ad1f64d90a78ba8848e2c6'/>
<id>852aee69f49c654a03ad1f64d90a78ba8848e2c6</id>
<content type='text'>
- Threads created by PyGILState_Ensure() could have a duplicate tstate-&gt;id.

(cherry picked from commit b3b9ade4a3d3fe00d933bcd8fc5c5c755d1024f9)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Threads created by PyGILState_Ensure() could have a duplicate tstate-&gt;id.

(cherry picked from commit b3b9ade4a3d3fe00d933bcd8fc5c5c755d1024f9)</pre>
</div>
</content>
</entry>
<entry>
<title>closes bpo-38124: Fix bounds check in PyState_AddModule. (GH-16007)</title>
<updated>2019-09-12T00:02:50+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2019-09-12T00:02:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=8892a1d685e4898b28961308b3c1447fe9ad3269'/>
<id>8892a1d685e4898b28961308b3c1447fe9ad3269</id>
<content type='text'>
The &gt;=, checking whether a module index was in already in the module-by-index list, needed to be strict.

Also, fold nested ifs into one and fix some bad spacing.
(cherry picked from commit 39de95b746c990e6a2fe9af5fad01747f58b2e5f)

Co-authored-by: Benjamin Peterson &lt;benjamin@python.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The &gt;=, checking whether a module index was in already in the module-by-index list, needed to be strict.

Also, fold nested ifs into one and fix some bad spacing.
(cherry picked from commit 39de95b746c990e6a2fe9af5fad01747f58b2e5f)

Co-authored-by: Benjamin Peterson &lt;benjamin@python.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[3.7] bpo-34408: Prevent a null pointer dereference and resource leakage in `PyInterpreterState_New()` (GH-8767) (GH-13237)</title>
<updated>2019-05-10T20:16:19+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2019-05-10T20:16:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=34ed40f2e56703de04241cbacb306113b59a84f9'/>
<id>34ed40f2e56703de04241cbacb306113b59a84f9</id>
<content type='text'>
* A pointer in `PyInterpreterState_New()` could have been `NULL` when being dereferenced.

* Memory was leaked in `PyInterpreterState_New()` when taking some error-handling code path.
(cherry picked from commit 95d630e)

Co-authored-by: Pablo Galindo &lt;Pablogsal@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* A pointer in `PyInterpreterState_New()` could have been `NULL` when being dereferenced.

* Memory was leaked in `PyInterpreterState_New()` when taking some error-handling code path.
(cherry picked from commit 95d630e)

Co-authored-by: Pablo Galindo &lt;Pablogsal@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-35414: Add a missing Py_INCREF(Py_None) in PyState_RemoveModule(). (GH-10914)</title>
<updated>2018-12-05T07:51:08+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2018-12-05T07:51:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=2d594f857865a4719876ac545ddfd62f474522cd'/>
<id>2d594f857865a4719876ac545ddfd62f474522cd</id>
<content type='text'>
(cherry picked from commit 2a893430c9c8378cbdfac95895a64fa07aaff9ed)

Co-authored-by: Zackery Spytz &lt;zspytz@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 2a893430c9c8378cbdfac95895a64fa07aaff9ed)

Co-authored-by: Zackery Spytz &lt;zspytz@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-33612: Remove PyThreadState_Clear() assertion (GH-7069) (GH-7074)</title>
<updated>2018-05-23T19:58:21+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2018-05-23T19:58:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=508d7693bc09affd99fdaa4a321cc3da0638c8a0'/>
<id>508d7693bc09affd99fdaa4a321cc3da0638c8a0</id>
<content type='text'>
bpo-25612, bpo-33612: Remove an assertion from PyThreadState_Clear()
which failed at Python shutdown or on fork if a thread was running a
generator.
(cherry picked from commit b6dccf54fd3bac9c87348d96f9d6b571608c15bc)

Co-authored-by: Victor Stinner &lt;vstinner@redhat.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
bpo-25612, bpo-33612: Remove an assertion from PyThreadState_Clear()
which failed at Python shutdown or on fork if a thread was running a
generator.
(cherry picked from commit b6dccf54fd3bac9c87348d96f9d6b571608c15bc)

Co-authored-by: Victor Stinner &lt;vstinner@redhat.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-32604: Remove xid registry. (#6813)</title>
<updated>2018-05-15T13:56:18+00:00</updated>
<author>
<name>Eric Snow</name>
<email>ericsnowcurrently@gmail.com</email>
</author>
<published>2018-05-15T13:56:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=6bd0c476c58ca0046969f70dc2a4e4dfb3268062'/>
<id>6bd0c476c58ca0046969f70dc2a4e4dfb3268062</id>
<content type='text'>
Remove the interpreters testing helper (and xid registry).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the interpreters testing helper (and xid registry).</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-33005: Fix _PyGILState_Reinit() (GH-6001)</title>
<updated>2018-03-06T13:52:27+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2018-03-06T13:52:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=31e2b76f7bbcb8278748565252767a8b7790ff27'/>
<id>31e2b76f7bbcb8278748565252767a8b7790ff27</id>
<content type='text'>
Fix a crash on fork when using a custom memory allocator (ex: using
PYTHONMALLOC env var).

_PyGILState_Reinit() and _PyInterpreterState_Enable() now use the
default RAW memory allocator to allocate a new interpreters mutex on
fork.
(cherry picked from commit 5d92647102fac9e116b98ab8bbc632eeed501c34)

Co-authored-by: Victor Stinner &lt;victor.stinner@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix a crash on fork when using a custom memory allocator (ex: using
PYTHONMALLOC env var).

_PyGILState_Reinit() and _PyInterpreterState_Enable() now use the
default RAW memory allocator to allocate a new interpreters mutex on
fork.
(cherry picked from commit 5d92647102fac9e116b98ab8bbc632eeed501c34)

Co-authored-by: Victor Stinner &lt;victor.stinner@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-32604: Swap threads only if the interpreter is different. (gh-5783)</title>
<updated>2018-02-21T00:09:41+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2018-02-21T00:09:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=eed3c7af4ec520d324a55e0357f41589a66906f7'/>
<id>eed3c7af4ec520d324a55e0357f41589a66906f7</id>
<content type='text'>
The CPython runtime assumes that there is a one-to-one relationship (for a given interpreter) between PyThreadState and OS threads. Sending and receiving on a channel in the same interpreter was causing crashes because of this (specifically due to a check in PyThreadState_Swap()). The solution is to not switch threads if the interpreter is the same.
(cherry picked from commit f53d9f2778a87bdd48eb9030f782a4ebf9e7622f)

Co-authored-by: Eric Snow &lt;ericsnowcurrently@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The CPython runtime assumes that there is a one-to-one relationship (for a given interpreter) between PyThreadState and OS threads. Sending and receiving on a channel in the same interpreter was causing crashes because of this (specifically due to a check in PyThreadState_Swap()). The solution is to not switch threads if the interpreter is the same.
(cherry picked from commit f53d9f2778a87bdd48eb9030f782a4ebf9e7622f)

Co-authored-by: Eric Snow &lt;ericsnowcurrently@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-32604: Clean up created subinterpreters before runtime finalization. (gh-5710)</title>
<updated>2018-02-17T02:15:24+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2018-02-17T02:15:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=3db05a3a9c109f49d54b4965852e41c657e9b117'/>
<id>3db05a3a9c109f49d54b4965852e41c657e9b117</id>
<content type='text'>
(cherry picked from commit 4c6955e2b0ccf88c705f8d1fac685a8e65f9699e)

Co-authored-by: Eric Snow &lt;ericsnowcurrently@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 4c6955e2b0ccf88c705f8d1fac685a8e65f9699e)

Co-authored-by: Eric Snow &lt;ericsnowcurrently@gmail.com&gt;</pre>
</div>
</content>
</entry>
</feed>
