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 <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1595>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to