[New-bugs-announce] [issue41062] Advanced Debugger Support C-API is useless without HEAD_LOCK()/HEAD_UNLOCK()

Andrei Pashkin report at bugs.python.org
Sun Jun 21 04:53:48 EDT 2020


New submission from Andrei Pashkin <andrew.pashkin at gmx.co.uk>:

To me it seems like Advanced Debugger Support C-API doesn't make sense without HEAD_LOCK() and HEAD_UNLOCK() which are private right now.

When researching how C-API works I've found this comment in the source code:
https://github.com/python/cpython/blob/e838a9324c1719bb917ca81ede8d766b5cb551f4/Python/pystate.c#L1176

It says that the lists of interpreter-state and thread-state objects (that Adv. Debugger Support API operates on) could be mutated even when GIL is held so there is need to acquire head mutex when accessing them. But there is no way to acquire head mutex using public C-API.

Am I right? If yes - it seems like HEAD_(UN)LOCK() should be made public.

----------
components: C API
messages: 371988
nosy: pashkin
priority: normal
severity: normal
status: open
title: Advanced Debugger Support C-API is useless without HEAD_LOCK()/HEAD_UNLOCK()
type: behavior
versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41062>
_______________________________________


More information about the New-bugs-announce mailing list