[PATCH] Avoid backtrace from __stack_chk_fail [BZ #12189]

Florian Weimer fw@deneb.enyo.de
Tue Jul 11 08:44:00 GMT 2017


* Adhemerval Zanella:

>> +CFLAGS-tst-ssp-1.c = -Wno-format -Wno-deprecated-declarations -Wno-error \
>> +		     -O0 -fstack-protector
>
> Why explicit -O0 here?

The test case is invalid C because it writes out of bounds, and newer
compiler versions can see that.  I'd suggest to use
-fstack-protector-all and a memory barrier instead (along with
comments).  That should mean that none of the -W flags are necessary,
either.



More information about the Libc-alpha mailing list