]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libssp: don't compile with -fstack-protector*
authorKyle Evans <kevans@FreeBSD.org>
Sat, 14 Mar 2020 15:15:27 +0000 (15:15 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Sat, 14 Mar 2020 15:15:27 +0000 (15:15 +0000)
commit19fe57fdb4fd2c18a37f2a972617c8769609cdb8
tree2f378400216d1f338e5f6c0f712801895a857b44
parent1b786d01917ccd90f4b2fffab8e735a25707e63d
libssp: don't compile with -fstack-protector*

This similarly matches what we do in libc; compiling libssp with
-fstack-protector* is actively harmful.  For instance, if the canary ctor
ends up with a stack protector then it will trivially trigger a false
positive as the canary's being initialized.

This was noted by the reporter as irc/ircd-hybrid started crashing at start
after our libssp was MFC'd to stable/11, as its build will explicitly link
in libssp. On FreeBSD, this isn't necessary as SSP bits are included in
libc, but it should absolutely not trigger runtime breakage -- it does mean
that the canary will get initialized twice, but as this is happening early
on in application startup it should just be redundant work.

Reported by: Tod McQuillin <devin@sevenlayer.studio>
MFC after: 3 days
lib/libssp/Makefile