Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/ssp Explain what's going on with fortify being disa...



details:   https://anonhg.NetBSD.org/src/rev/9219b2f7bab4
branches:  trunk
changeset: 780276:9219b2f7bab4
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Jul 18 22:22:26 2012 +0000

description:
Explain what's going on with fortify being disabled when the optimizer is off:
http://gcc.gnu.org/ml/gcc-patches/2012-06/msg00174.html

diffstat:

 lib/libc/ssp/__builtin_object_size.3 |  15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r 2864bb7db011 -r 9219b2f7bab4 lib/libc/ssp/__builtin_object_size.3
--- a/lib/libc/ssp/__builtin_object_size.3      Wed Jul 18 21:55:05 2012 +0000
+++ b/lib/libc/ssp/__builtin_object_size.3      Wed Jul 18 22:22:26 2012 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: __builtin_object_size.3,v 1.8 2010/12/19 09:33:52 jruoho Exp $
+.\"    $NetBSD: __builtin_object_size.3,v 1.9 2012/07/18 22:22:26 christos Exp $
 .\"
 .\" Copyright (c) 2007 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -28,7 +28,7 @@
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
 .\"
-.Dd December 19, 2010
+.Dd July 18, 2012
 .Dt __BUILTIN_OBJECT_SIZE 3
 .Os
 .Sh NAME
@@ -88,3 +88,14 @@
 .Tn GCC 4.1 .
 .Sh CAVEATS
 This is a non-standard, compiler-specific extension.
+.Pp
+Note that currently the object size calculation pass is only done at -O1
+or above, meaning that this function always returns -1 when the optimizer
+is off.
+.Pp
+There are some discussions about always doing the object size pass, but
+the issue is that without the optimization pass data sizes are not going
+to be correct.
+.Pp
+For that reason currently code fortification (size-checked replacement
+functions) is disabled when optimization is off.



Home | Main Index | Thread Index | Old Index