[issue24851] infinite loop in faulthandler._stack_overflow
New submission from Paul Murphy: This is a duplicate of Issue 23654, except it occurs on GCC 5.1 with -O2 when building for a ppc64le target. GCC is optimizes this as a tail call, removing the accesses to the "unused" stack variables. -- components: Extension Modules files: fix_stack_overflow.patch keywords: patch messages: 248472 nosy: Paul Murphy priority: normal severity: normal status: open title: infinite loop in faulthandler._stack_overflow versions: Python 3.4 Added file: http://bugs.python.org/file40170/fix_stack_overflow.patch ___ Python tracker <http://bugs.python.org/issue24851> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24851] infinite loop in faulthandler._stack_overflow
Paul Murphy added the comment: Somehow, you need to preserve access to the stack memory. The generated code is still growing the stack, it just fails to touch any of it. I'm guessing a volatile access would just add an extra non-stack access to the infinite loop. Initially, I had tried creating a non-inlined function to touch the stack memory. It worked in this case, but still required some undesirable compiler specific assistance. -- ___ Python tracker <http://bugs.python.org/issue24851> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24851] infinite loop in faulthandler._stack_overflow
Paul Murphy added the comment: ... #pragma GCC optimize ("no-optimize-sibling-calls") ... Does preserve the desired behavior under -O2 and -O3, probably a bit nicer than using O0. -- ___ Python tracker <http://bugs.python.org/issue24851> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com