[issue24851] infinite loop in faulthandler._stack_overflow

2021-12-05 Thread Irit Katriel


Change by Irit Katriel :


--
stage:  -> resolved
status: pending -> closed

___
Python tracker 

___
___
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

2021-11-27 Thread Irit Katriel


Irit Katriel  added the comment:

I think this was fixed in issue38965.

--
nosy: +iritkatriel, ned.deily
resolution:  -> duplicate
status: open -> pending
superseder:  -> test_stack_overflow (test.test_faulthandler.FaultHandlerTests) 
is stuck with GCC10

___
Python tracker 

___
___
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

2019-05-08 Thread Xi Ruoyao


Change by Xi Ruoyao :


--
versions: +Python 3.7

___
Python tracker 

___
___
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

2015-08-14 Thread Paul Murphy

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 

___
___
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

2015-08-14 Thread Ronald Oussoren

Ronald Oussoren added the comment:

GCC has a pragma and function attributes for changing the optimisation flags, 
that could be used to disable the tail call optimazation here.

Something like the following (using a pragma):

#pragma GCC push_options
#pragma GCC optimize ("-fno-optimize-sibling-calls")

#pragma GCC pop_options

Note: completely untested, and would need preprocessor guards to avoid warnings 
with some other compilers.

--
nosy: +ronaldoussoren

___
Python tracker 

___
___
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

2015-08-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> 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.

Hmm... store the non-inlined function's pointer in a volatile global, and call 
that pointer?

--

___
Python tracker 

___
___
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

2015-08-13 Thread Paul Murphy

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 

___
___
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

2015-08-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

To fix this in a generic way, perhaps the function could update a volatile 
global variable after the recursive call?

--
nosy: +pitrou

___
Python tracker 

___
___
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

2015-08-12 Thread Yury Selivanov

Changes by Yury Selivanov :


--
nosy: +haypo

___
Python tracker 

___
___
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

2015-08-12 Thread Paul Murphy

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com