This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] m68k: fix clobbering a5 in setjmp() [BZ #24202]
- From: Florian Weimer <fweimer at redhat dot com>
- To: Sergei Trofimovich <slyfox at gentoo dot org>
- Cc: libc-alpha at sourceware dot org, Andreas Schwab <schwab at suse dot de>, James Le Cuirot <chewi at gentoo dot org>, Andreas Schwab <schwab at linux-m68k dot org>
- Date: Sun, 24 Feb 2019 11:16:41 +0100
- Subject: Re: [PATCH] m68k: fix clobbering a5 in setjmp() [BZ #24202]
- References: <20190210232910.22652-1-slyfox@gentoo.org>
* 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