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

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Feb 22 20:22:00 GMT 2018


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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
cfun->has_nonlocal_label instead of cfun->calls_setjmp would cover
__builtin_setjmp.

aarch64_frame_pointer_required would force frame_pointer_needed and thus be
true in that case too.  But sure, if it works, we can change:
   /* Force a frame chain for EH returns so the return address is at FP+8.  */
   cfun->machine->frame.emit_frame_chain
-    = frame_pointer_needed || crtl->calls_eh_return;
+    = frame_pointer_needed || crtl->calls_eh_return ||
cfun->has_nonlocal_label;


More information about the Gcc-bugs mailing list