[issue23654] infinite loop in faulthandler._stack_overflow

2015-03-23 Thread STINNER Victor
STINNER Victor added the comment: Thanks for your contribution Matt! -- resolution: -> fixed status: open -> closed versions: -Python 3.6 ___ Python tracker ___ ___

[issue23654] infinite loop in faulthandler._stack_overflow

2015-03-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset d6003de8ecc8 by Victor Stinner in branch '3.4': Issue #23654: Fix faulthandler._stack_overflow() for the Intel C Compiler (ICC) https://hg.python.org/cpython/rev/d6003de8ecc8 -- nosy: +python-dev ___ Pyth

[issue23654] infinite loop in faulthandler._stack_overflow

2015-03-23 Thread Matt Frank
Matt Frank added the comment: This is a patch that turns off the Intel Compiler's optimization for the stack_overflow() function. It turns out that icc doesn't support gcc's __attribute__((optimize("no-optimize-sibling-calls"))). Instead I used an ifdef'd intel-specific pragma that turns off

[issue23654] infinite loop in faulthandler._stack_overflow

2015-03-18 Thread STINNER Victor
STINNER Victor added the comment: > It occurs to me that the right way to deal with this is with > __attribute__ ((optimize ("no-optimize-sibling-calls"))) > on the function where it matters (stack_overflow()). Can you please write a patch for that with the right #ifdef to only add it to ICC?

[issue23654] infinite loop in faulthandler._stack_overflow

2015-03-13 Thread Matt Frank
Matt Frank added the comment: Yes, this is currently only a problem with the Intel compiler. The writes to buffer[] are dead (provably won't be ever used) at the point that the recursive call occurs. Actually gcc and llvm can figure this out. Thus all the space allocated for the first call c

[issue23654] infinite loop in faulthandler._stack_overflow

2015-03-13 Thread STINNER Victor
STINNER Victor added the comment: > When the faulthandler module is compiled at -O3 (the default for non-debug > builds) with a compiler that does tailcall optimization ... test_faulthandler pass with GCC 4.9.2 (Fedora 21) when faulthandler.c is compiled in -O3 mode. I guess that such config d

[issue23654] infinite loop in faulthandler._stack_overflow

2015-03-12 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue23654] infinite loop in faulthandler._stack_overflow

2015-03-12 Thread Matt Frank
New submission from Matt Frank: When the faulthandler module is compiled at -O3 (the default for non-debug builds) with a compiler that does tailcall optimization the Modules/faulthandler.c:stack_overflow() function may become an infinite loop that does not expand the stack. This puts the int