Fix signal delivery for the iBCS2 binaries. The iBCS2 sysvec uses
current FreeBSD signal trampoline, but does not specifies sv_sigcode_base, since shared page is not mapped. This results in the zero %eip for the signal frame. Fall back to calculating %eip as offset from the psstrings when sv_sigcode_base is not initialized. Reported by: Rich Naill <rich@enterprisesystems.net> Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
647e61eaca
commit
760faf9fdd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=257858
@ -757,6 +757,8 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
|
||||
|
||||
regs->tf_esp = (int)sfp;
|
||||
regs->tf_eip = p->p_sysent->sv_sigcode_base;
|
||||
if (regs->tf_eip == 0)
|
||||
regs->tf_eip = p->p_sysent->sv_psstrings - szsigcode;
|
||||
regs->tf_eflags &= ~(PSL_T | PSL_D);
|
||||
regs->tf_cs = _ucodesel;
|
||||
regs->tf_ds = _udatasel;
|
||||
|
Loading…
Reference in New Issue
Block a user