[issue44645] Python 3.10: Under some trivial circunstances, GIL not released

Mark Shannon report at bugs.python.org
Thu Jul 15 10:12:33 EDT 2021


Mark Shannon <mark at hotpy.org> added the comment:

https://github.com/python/cpython/pull/18334 assumes that since all loops will contain a backwards edge, checking for interrupts on JUMP_ABSOLUTE should be sufficient.

However, https://github.com/python/cpython/pull/23743 changed the back edges in while statements. So `worker` compiles to:

  2           0 LOAD_GLOBAL              0 (cont)
              2 POP_JUMP_IF_FALSE        7 (to 14)

  3     >>    4 NOP

  2           6 LOAD_GLOBAL              0 (cont)
              8 POP_JUMP_IF_TRUE         2 (to 4)
             10 LOAD_CONST               0 (None)
             12 RETURN_VALUE
        >>   14 LOAD_CONST               0 (None)
             16 RETURN_VALUE

which has no CALL or JUMP_ABSOLUTE instructions.

----------

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


More information about the Python-bugs-list mailing list