[Bug other/26208] Serious problem with unwinding through signal frames
uweigand at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Feb 10 20:00:00 GMT 2006
------- Comment #3 from uweigand at gcc dot gnu dot org 2006-02-10 20:00 -------
Yup. See how this is handled in config/s390/linux-unwind.c:
/* If we got a SIGSEGV or a SIGBUS, the PSW address points *to*
the faulting instruction, not after it. This causes the logic
in unwind-dw2.c that decrements the RA to determine the correct
CFI region to get confused. To fix that, we *increment* the RA
here in that case. Note that we cannot modify the RA in place,
and the frame state wants a *pointer*, not a value; thus we put
the modified RA value into the unused register 33 slot of FS and
have the register 32 save address point to that slot.
Unfortunately, for regular signals on old kernels, we don't know
the signal number. We default to not fiddling with the RA;
that can fail in rare cases. Upgrade your kernel. */
if (signo && (*signo == 11 || *signo == 7))
{
fs->regs.reg[33].loc.exp =
(unsigned char *)regs->psw_addr + 1;
fs->regs.reg[32].loc.offset =
(long)&fs->regs.reg[33].loc.exp - new_cfa;
}
--
uweigand at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |uweigand at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26208
More information about the Gcc-bugs
mailing list