svn commit: r259045 - head/sys/conf
Konstantin Belousov
kib at FreeBSD.org
Fri Dec 6 21:44:14 UTC 2013
Author: kib
Date: Fri Dec 6 21:44:13 2013
New Revision: 259045
URL: http://svnweb.freebsd.org/changeset/base/259045
Log:
Disallow optimizations which potentially remove boundary checks
for signed values due to a compiler authors considering integer
overflow as impossible.
The change follows suit of other projects taking the same measure.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Modified:
head/sys/conf/kern.mk
Modified: head/sys/conf/kern.mk
==============================================================================
--- head/sys/conf/kern.mk Fri Dec 6 21:39:45 2013 (r259044)
+++ head/sys/conf/kern.mk Fri Dec 6 21:44:13 2013 (r259045)
@@ -148,6 +148,12 @@ INLINE_LIMIT?= 8000
CFLAGS+= -ffreestanding
#
+# Do not allow a compiler to optimize out overflow checks for signed
+# types.
+#
+CFLAGS+= -fno-strict-overflow
+
+#
# GCC SSP support
#
.if ${MK_SSP} != "no" && ${MACHINE_CPUARCH} != "ia64" && \
More information about the svn-src-all
mailing list