https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125803

Gerald Pfeifer <gerald at pfeifer dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2026-08-12
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #4 from Gerald Pfeifer <gerald at pfeifer dot com> ---
(In reply to Piotr Kubaj from comment #0)
> The problem is that the code assumes ELFv1 and sets TOC save slot offset of
> 40 bytes:
> std r2,40(r1)   == 0xF8410028
> ld  r2,40(r1)   == 0xE8410028
> context->cfa + 40 ,  sp + 40
> 
> But ELFv2 saves the TOC at offset 24 (std r2,24(r1) / ld r2,24(r1)), so
> none of the checks ever match, r2 is never restored, and the handler
> runs with the wrong TOC.

Very nice detective work, Piotr, by the way!

Reply via email to