[Bug target/84521] [8 Regression] aarch64: Frame-pointer corruption with __builtin_setjmp/__builtin_longjmp and -fomit-frame-pointer

ramana.radhakrishnan at foss dot arm.com gcc-bugzilla@gcc.gnu.org
Thu Mar 8 12:20:00 GMT 2018


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

--- Comment #18 from ramana.radhakrishnan at foss dot arm.com ---
On 07/03/2018 18:59, sudi at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84521
> 
> --- Comment #17 from sudi at gcc dot gnu.org ---
> I looked up what other targets were doing and one thing found to be interesting
> was that a lot of them are defining the target hook
> TARGET_BUILTIN_SETJMP_FRAME_VALUE. In AArch64 case I am suggesting to define it
> to return the hard frame pointer. That seems to solve the issue with both the
> attached test case and the test that Wilco mentioned.
> 
> Does this look like it solves "mid-end versus back-end : who fixes this issue"
> problem?
> 
> I am still pretty new to knowing how the stack should actually look. So calling
> for some help!
> 
> Sudi
> 

That looks sensible. Especially see the comment in arc/arc.c - that
seems to mirror the decision we want in AArch64 as well. The logic /
comment around this in the arc port seems quite reasonable to me and
looks like what we can have on AArch64 as well.

Ramana


More information about the Gcc-bugs mailing list