[issue1595] Probable extra semicolon in Py_LeaveRecursiveCall macro
Amaury Forgeot d'Arc
report at bugs.python.org
Tue Dec 11 22:40:49 CET 2007
New submission from Amaury Forgeot d'Arc:
In file ceval.h, the macro Py_LeaveRecursiveCall is defined like this:
#define Py_LeaveRecursiveCall() \
do{ if((--PyThreadState_GET()->recursion_depth) < \
_Py_CheckRecursionLimit - 50); \
PyThreadState_GET()->overflowed = 0; \
} while(0)
The semicolon on the third line seems very suspicious to me: the if()
statement has no side effect, and "overflowed" is always reset to zero.
I don't really understand the consequences, though. The variable seems
to be used as an additional protection against C code that does not
correctly unwind when the recursion limit is hit.
----------
assignee: loewis
components: Interpreter Core
keywords: py3k
messages: 58468
nosy: amaury.forgeotdarc, loewis
severity: normal
status: open
title: Probable extra semicolon in Py_LeaveRecursiveCall macro
versions: Python 3.0
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1595>
__________________________________
More information about the Python-bugs-list
mailing list