NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/55719 (Unwind tables for signal trampoline on amd64 are incorrect)

Sure thing! I can see if that works later tonight.

One thing jumps out at me, though: it doesn't seem valid to redefine the CFA like that? As I understand it, the CFA on amd64 is defined to be the stack pointer in the caller's frame at the time of the call, and you're not allowed to define it otherwise. The reason to use multiple .cfi_def_cfa directives in one function would be to update the CFA *computation* to account for changes to the variables used in the computation (e.g. RSP), but not to actually change the CFA itself.

That said, it's possible that changing the CFA as you propose works just fine in practice. Someone more knowledgeable than me would be better equipped to say for sure.

I should note that I am far from an expert on this topic. Everything I know about unwind tables has been pieced together in the last two days while trying to fix this gccgo test.

On Sun, Oct 11, 2020 at 8:46 PM Kamil Rytarowski <> wrote:
On 12.10.2020 01:54, wrote:
> Synopsis: Unwind tables for signal trampoline on amd64 are incorrect
> Responsible-Changed-From-To: lib-bug-people->kamil
> Responsible-Changed-By:
> Responsible-Changed-When: Mon, 12 Oct 2020 01:54:22 +0200
> Responsible-Changed-Why:
> Take.

We ended up with something like this, but ran out of time:

Could you please check this code?

This approach was proposed/inspired by Andrew Cagney and written by myself.

We could combine this with the approach.

Home | Main Index | Thread Index | Old Index