This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug optimization/11222] New: arm/thumb __Unwind_SjLj_Register prologue optimization causes crash on interrupts


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]