[Bug optimization/11222] New: arm/thumb __Unwind_SjLj_Register prologue optimization causes crash on interrupts
mrbolha@ukonline.co.uk
gcc-bugzilla@gcc.gnu.org
Tue Jun 17 15:08:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11222
Summary: arm/thumb __Unwind_SjLj_Register prologue optimization
causes crash on interrupts
Product: gcc
Version: 3.2.2
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: mrbolha@ukonline.co.uk
CC: gcc-bugs@gcc.gnu.org
GCC build triplet: -O2 -fexceptions -mthumb
GCC host triplet: i686-pc-cygwin
GCC target triplet: arm-elf-gcc
The generated code for thumb instruction set with -O2 optimization, when using
exceptions, has the "sub sp" instruction (ergo the allocation of local
variables) called after data manipulation on the local vars in the stack
unwinding prologue, which causes data to be corrupted on the event of an
interruption.
NOTE: it was so in Ecos, because it switches the processor mode back to
supervisor, causing the same stack pointer to be used both in the running thread
and the interrupt handler.
More information about the Gcc-bugs
mailing list