Change 33472 by [EMAIL PROTECTED] on 2008/03/11 15:56:33

        Integrate:
        [ 33464]
        Integrate:
        [ 32966]
        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]>
        
        [ 33330]
        Subject: [perl #50946] modified hints for Darwin x86  64bit 
        From: "Daniel M. Quinlan" (via RT) <[EMAIL PROTECTED]>
        Date: Sun, 17 Feb 2008 14:20:58 -0800
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 33357]
        Subject: [PATCH] cygwin hints
        From: "Reini Urban" <[EMAIL PROTECTED]>
        Date: Thu, 21 Feb 2008 14:38:33 +0100
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

... //depot/maint-5.8/perl/hints/cygwin.sh#9 integrate
... //depot/maint-5.8/perl/hints/darwin.sh#32 integrate
... //depot/maint-5.8/perl/hints/dec_osf.sh#18 integrate
... //depot/maint-5.8/perl/perl.h#180 edit

Differences ...

==== //depot/maint-5.8/perl/hints/cygwin.sh#9 (text) ====
Index: perl/hints/cygwin.sh
--- perl/hints/cygwin.sh#8~32406~       2007-11-19 09:03:26.000000000 -0800
+++ perl/hints/cygwin.sh        2008-03-11 08:56:33.000000000 -0700
@@ -30,10 +30,12 @@
 #   the Perl SysV IPC tests so not adding it --jhi 2003-08-09
 #   (with cygwin 1.5.7, cygipc is deprecated in favor of the builtin cygserver)
 libswanted="$libswanted gdbm_compat"
-test -z "$optimize" && optimize='-O2'
+test -z "$optimize" && optimize='-O3'
+man3ext='3pm'
+test -z "$use64bitint" && use64bitint='define'
+test -z "$usethreads" && usethreads='define'
+test -z "$usemymalloc" && usemymalloc='define'
 ccflags="$ccflags -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__"
-# - otherwise i686-cygwin
-archname='cygwin'
 
 # dynamic loading
 # - otherwise -fpic
@@ -51,17 +53,21 @@
         ;;
 esac;
 
-# compile Win32CORE "module" as static
-static_ext="$static_ext Win32CORE"
+# compile Win32CORE "module" as static. try to avoid the space.
+if test -z "$static_ext"; then
+  static_ext="Win32CORE"
+else
+  static_ext="$static_ext Win32CORE"
+fi
 
 # Win9x problem with non-blocking read from a closed pipe
 d_eofnblk='define'
 
 # suppress auto-import warnings
-ldflags="$ldflags -Wl,--enable-auto-import -Wl,--export-all-symbols 
-Wl,--stack,8388608 -Wl,--enable-auto-image-base -Wl,--enable-auto-import"
+ldflags="$ldflags -Wl,--enable-auto-import -Wl,--export-all-symbols 
-Wl,--stack,8388608 -Wl,--enable-auto-image-base"
 lddlflags="$lddlflags $ldflags"
 
-# strip exe's and dll's
+# strip exe's and dll's, better do it afterwards
 #ldflags="$ldflags -s"
-ccdlflags="$ccdlflags -s"
+#ccdlflags="$ccdlflags -s"
 #lddlflags="$lddlflags -s"

==== //depot/maint-5.8/perl/hints/darwin.sh#32 (text) ====
Index: perl/hints/darwin.sh
--- perl/hints/darwin.sh#31~30046~      2007-01-27 15:25:32.000000000 -0800
+++ perl/hints/darwin.sh        2008-03-11 08:56:33.000000000 -0700
@@ -224,9 +224,19 @@
 ***    ext/threads/shared/t/wait (threaded builds only)
 
 EOM
+    case `uname -p` in 
+    powerpc) arch=ppc64 ;;
+    i386) arch=x86_64 ;;
+    *) cat <<EOM >&4
+
+*** Don't recognize processor, can't specify 64 bit compilation.
+
+EOM
+    ;;
+    esac
     for var in ccflags cppflags ld ldflags
     do
-       eval $var="\$${var}\ -arch\ ppc64"
+       eval $var="\$${var}\ -arch\ $arch"
     done
 
     [ "$d_msgctl" ] || d_msgctl='undef'

==== //depot/maint-5.8/perl/hints/dec_osf.sh#18 (text) ====
Index: perl/hints/dec_osf.sh
--- perl/hints/dec_osf.sh#17~32404~     2007-11-19 05:18:32.000000000 -0800
+++ perl/hints/dec_osf.sh       2008-03-11 08:56:33.000000000 -0700
@@ -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.
 #

==== //depot/maint-5.8/perl/perl.h#180 (text) ====
Index: perl/perl.h
--- perl/perl.h#179~33454~      2008-03-08 15:09:00.000000000 -0800
+++ perl/perl.h 2008-03-11 08:56:33.000000000 -0700
@@ -3633,12 +3633,9 @@
 
 #define YYMAXDEPTH 300
 
-#ifndef assert  /* <assert.h> might have been included somehow */
-#define assert(what)   PERL_DEB(                                       \
-       ((what) ? ((void) 0) :                                          \
-           (Perl_croak_nocontext("Assertion %s failed: file \"" __FILE__ \
-                       "\", line %d", STRINGIFY(what), __LINE__),      \
-           (void) 0)))
+
+#if defined(DEBUGGING)
+#  include <assert.h>
 #endif
 
 struct ufuncs {
End of Patch.

Reply via email to