Change 32966 by [EMAIL PROTECTED] on 2008/01/12 03:13:55
Subject: [PATCH] tru64: poison stack, write protect string constants
From: Jarkko Hietaniemi <[EMAIL PROTECTED]>
Date: Sat, 12 Jan 2008 03:27:10 +0200 (EET)
Message-Id: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/hints/dec_osf.sh#71 edit
Differences ...
==== //depot/perl/hints/dec_osf.sh#71 (text) ====
Index: perl/hints/dec_osf.sh
--- perl/hints/dec_osf.sh#70~32203~ 2007-10-30 05:24:45.000000000 -0700
+++ perl/hints/dec_osf.sh 2008-01-11 19:13:55.000000000 -0800
@@ -518,6 +518,27 @@
* ) export LD_LIBRARY_PATH ;;
esac
+# Enforce strict data.
+case "$isgcc" in
+gcc) ;;
+*) # -trapuv poisons uninitialized stack with
+ # 0xfff58005fff58005 which is as a pointer a segmentation fault and
+ # as a floating point a signaling NaN. As integers/longs that causes
+ # no traps but at least it is not zero.
+ # -readonly_strings moves string constants into read-only section
+ # which hopefully means that modifying them leads into segmentation
+ # faults.
+ #
+ for i in -trapuv -readonly_strings
+ do
+ case "$ccflags" in
+ *$i*) ;;
+ *) ccflags="$ccflags $i" ;;
+ esac
+ done
+ ;;
+esac
+
#
# Unset temporary variables no more needed.
#
End of Patch.