Issue 35368: [2.7] Make PyMem_Malloc() thread-safe in debug mode (original) (raw)

Issue35368

Created on 2018-11-30 23:07 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 10828 merged vstinner,2018-11-30 23:09
PR 10866 closed vstinner,2018-12-03 11:45
Messages (4)
msg330833 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-30 23:07
While fixing bpo-33015, I discovered that PyMem_Malloc() isn't thread-safe when Python is compiled in debug mode: https://bugs.python.org/issue33015#msg330806 I wrote PR 10828 to make PyMem_Malloc() thread-safe when Python is compiled in debug mode.
msg330937 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-12-03 11:29
New changeset c275be54411d425c90e7c679ddb5321ba458f61d by Victor Stinner in branch '2.7': bpo-35368: Make PyMem_Malloc() thread-safe in debug mode (GH-10828) https://github.com/python/cpython/commit/c275be54411d425c90e7c679ddb5321ba458f61d
msg330958 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-12-03 16:45
According to bpo-31473, the debug hook on PyMem_Malloc() is not thread-safe: 'serialno' variable is not protected by any lock and it's not atomic.
msg332036 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-12-18 01:12
Let's continue discussion on serialno atomicity on bpo-31473.
History
Date User Action Args
2022-04-11 14:59:08 admin set github: 79549
2018-12-18 01:12:54 vstinner set status: open -> closedresolution: fixedmessages: + stage: patch review -> resolved
2018-12-03 16:45:17 vstinner set messages: +
2018-12-03 11:45:56 vstinner set pull_requests: + <pull%5Frequest10102>
2018-12-03 11:29:31 vstinner set messages: +
2018-11-30 23:09:40 vstinner set keywords: + patchstage: patch reviewpull_requests: + <pull%5Frequest10076>
2018-11-30 23:07:48 vstinner create