[PATCH] m68k: fix clobbering a5 in setjmp() [BZ #24202]

Florian Weimer fweimer@redhat.com
Sun Feb 24 10:16:00 GMT 2019


* Sergei Trofimovich:

> setjmp() uses C code to store current registers into jmp_buf
> environment. -fstack-protector-all places canary into setjmp()
> prologue and clobbers 'a5' before it gets saved.
>
> The change inhibits stack canary injection to avoid clobber.
>
> 	[BZ #24202]
> 	* sysdeps/m68k/setjmp.c (*setjmp): Use
> 	inhibit_stack_protector.

The code is still invalid.  The C compiler can still clobber any
register it wants.  So this does not actually fix the bug.  But I think
it's an incremental improvement.

Thanks,
Florian



More information about the Libc-alpha mailing list