Summary: | ptrace_test:ptrace__PT_STEP_with_signal test failed | ||
---|---|---|---|
Product: | Base System | Reporter: | fernando.valle |
Component: | tests | Assignee: | freebsd-testing (Nobody) <testing> |
Status: | Open --- | ||
Severity: | Affects Some People | CC: | markj |
Priority: | --- | ||
Version: | CURRENT | ||
Hardware: | powerpc | ||
OS: | Any |
Description
fernando.valle
2021-01-20 19:34:25 UTC
Seems to fail on arm64 as well. The problem on arm64 is that we don't disable single-stepping before executing a signal handler. I suspect the problem is the same on powerpc. This hack fixes the problem for me: diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 25f0a108311e..7d7f78760381 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -896,6 +896,8 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) tf->tf_elr = (register_t)catcher; tf->tf_sp = (register_t)fp; + tf->tf_spsr &= ~PSR_SS; + WRITE_SPECIALREG(mdscr_el1, READ_SPECIALREG(mdscr_el1) & ~DBG_MDSCR_SS); sysent = p->p_sysent; if (sysent->sv_sigcode_base != 0) tf->tf_lr = (register_t)sysent->sv_sigcode_base; |