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

--- Comment #2 from wgkun at hotmail dot com ---
(In reply to Andrew Pinski from comment #1)
> I don't think this is a valid thing to do with setjmp and longjmp.
> 
> Why are you not using makecontext/setcontext/getcontext/swapcontext instead?
> 
> Also why do you think this is a libgcc bug because if you try to unwind the
> stack using gdb, you will get the same behavior because the stack was that
> one thread is now on the other one but the that thread has now exited.

Thanks. I turn to makecontext/swapcontext and works well.

But, back to this problem, I still think it is something wrong in the tool
chain, gcc or libgcc.
gcc generate the asynchronous-unwind-tables and libgcc use them to do unwind.
As my understanding, when do unwind for a thread, you shall not visit other
context not belong to this thread now.
And why this only happens on X86_64? Is it related to the special definition of
unwind tables according to the X86_64 ABI which has some difference with formal
DWARF?

Reply via email to