This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: LSDA unwind information is off by one (in __gcc_personality_v0)

On 10/20/2016 08:37 PM, Jeff Law wrote:

Obviously if the PC value is actually pointing at the proper
instruction, then the decrement is highly undesirable as it could put
the adjusted PC into a different exception region.

Yes, that's what's happening with the glibc bug.

The question is how to fix this. We can adjust the unwind tables in glibc to the current behavior easily enough. The instructions involved are longer than one byte, so we should be able to compensate for a potential future libgcc which implements non-call unwinding correctly.

The other question is whether we really want to fix libgcc in this way, after all these years, and change the interpretation of unwind tables basically over night. We could perhaps add another personality routine to get a cleaner transition.

And the final question is we can trust current GCC to emit correct unwind tables for code which involves non-call exceptions (such as cancellation handlers in glibc, when we don't write them manually in assembler).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]