Change 20122 by [EMAIL PROTECTED] on 2003/07/10 18:06:05

        Integrate:
        [ 20116]
        The *right* way to make the csighandler visible.
        
        [ 20117]
        Subject: [PATCH] Restore SIGFPE on exec()
        From: Chip Salzenberg <[EMAIL PROTECTED]>
        Date: Thu, 10 Jul 2003 13:13:20 -0400
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 20118]
        malloc alignment patch from Spider, needed for Tru64 + longdouble.
        
        [ 20119]
        Subject: [PATCH] configure.gnu --prefix
        From: [EMAIL PROTECTED]
        Date: Thu, 10 Jul 2003 09:33:27 +0000
        Message-Id: <[EMAIL PROTECTED]>
        
        [ 20120]
        I can see the future.  It is cloudy.

Affected files ...

... //depot/maint-5.8/perl/configure.gnu#3 integrate
... //depot/maint-5.8/perl/doio.c#17 integrate
... //depot/maint-5.8/perl/embed.fnc#38 integrate
... //depot/maint-5.8/perl/embed.h#38 integrate
... //depot/maint-5.8/perl/global.sym#17 integrate
... //depot/maint-5.8/perl/malloc.c#6 integrate
... //depot/maint-5.8/perl/perl.c#43 integrate
... //depot/maint-5.8/perl/perl.h#38 integrate
... //depot/maint-5.8/perl/perlapi.h#23 integrate
... //depot/maint-5.8/perl/perlvars.h#11 integrate
... //depot/maint-5.8/perl/pod/perlhist.pod#3 integrate
... //depot/maint-5.8/perl/toke.c#25 integrate

Differences ...

==== //depot/maint-5.8/perl/configure.gnu#3 (xtext) ====
Index: perl/configure.gnu
--- perl/configure.gnu#2~18286~ Wed Dec 11 06:43:36 2002
+++ perl/configure.gnu  Thu Jul 10 11:06:05 2003
@@ -65,6 +65,12 @@
                opts="$opts $arg"
                shift
                ;;
+       --prefix)
+               shift
+               arg="-Dprefix=$1"
+               opts="$opts $arg"
+               shift
+               ;;
        --cache-file=*)
                shift           # Just ignore it.
                ;;

==== //depot/maint-5.8/perl/doio.c#17 (text) ====
Index: perl/doio.c
--- perl/doio.c#16~19791~       Sun Jun 15 10:57:06 2003
+++ perl/doio.c Thu Jul 10 11:06:05 2003
@@ -1429,10 +1429,12 @@
        if ((!really && *PL_Argv[0] != '/') ||
            (really && *tmps != '/'))           /* will execvp use PATH? */
            TAINT_ENV();                /* testing IFS here is overkill, probably */
+       PERL_FPU_PRE_EXEC
        if (really && *tmps)
            PerlProc_execvp(tmps,EXEC_ARGV_CAST(PL_Argv));
        else
            PerlProc_execvp(PL_Argv[0],EXEC_ARGV_CAST(PL_Argv));
+       PERL_FPU_POST_EXEC
        if (ckWARN(WARN_EXEC))
            Perl_warner(aTHX_ packWARN(WARN_EXEC), "Can't exec \"%s\": %s",
                (really ? tmps : PL_Argv[0]), Strerror(errno));
@@ -1502,7 +1504,9 @@
                  *--s = '\0';
              if (s[-1] == '\'') {
                  *--s = '\0';
+                 PERL_FPU_PRE_EXEC
                  PerlProc_execl(PL_cshname,"csh", flags, ncmd, (char*)0);
+                 PERL_FPU_POST_EXEC
                  *s = '\'';
                  return FALSE;
              }
@@ -1545,7 +1549,9 @@
                }
            }
          doshell:
+           PERL_FPU_PRE_EXEC
            PerlProc_execl(PL_sh_path, "sh", "-c", cmd, (char*)0);
+           PERL_FPU_POST_EXEC
            return FALSE;
        }
     }
@@ -1563,7 +1569,9 @@
     }
     *a = Nullch;
     if (PL_Argv[0]) {
+       PERL_FPU_PRE_EXEC
        PerlProc_execvp(PL_Argv[0],PL_Argv);
+       PERL_FPU_POST_EXEC
        if (errno == ENOEXEC) {         /* for system V NIH syndrome */
            do_execfree();
            goto doshell;

==== //depot/maint-5.8/perl/embed.fnc#38 (text) ====
Index: perl/embed.fnc
--- perl/embed.fnc#37~20113~    Thu Jul 10 07:19:22 2003
+++ perl/embed.fnc      Thu Jul 10 11:06:05 2003
@@ -702,7 +702,7 @@
 p      |void   |setdefout      |GV* gv
 p      |HEK*   |share_hek      |const char* sv|I32 len|U32 hash
 np     |Signal_t |sighandler   |int sig
-np     |Signal_t |csighandler  |int sig
+Anp    |Signal_t |csighandler  |int sig
 Ap     |SV**   |stack_grow     |SV** sp|SV**p|int n
 Ap     |I32    |start_subparse |I32 is_format|U32 flags
 p      |void   |sub_crush_depth|CV* cv

==== //depot/maint-5.8/perl/embed.h#38 (text+w) ====
Index: perl/embed.h
--- perl/embed.h#37~20091~      Wed Jul  9 01:23:20 2003
+++ perl/embed.h        Thu Jul 10 11:06:05 2003
@@ -975,9 +975,7 @@
 #ifdef PERL_CORE
 #define sighandler             Perl_sighandler
 #endif
-#ifdef PERL_CORE
 #define csighandler            Perl_csighandler
-#endif
 #define stack_grow             Perl_stack_grow
 #define start_subparse         Perl_start_subparse
 #ifdef PERL_CORE
@@ -3490,9 +3488,7 @@
 #ifdef PERL_CORE
 #define sighandler             Perl_sighandler
 #endif
-#ifdef PERL_CORE
 #define csighandler            Perl_csighandler
-#endif
 #define stack_grow(a,b,c)      Perl_stack_grow(aTHX_ a,b,c)
 #define start_subparse(a,b)    Perl_start_subparse(aTHX_ a,b)
 #ifdef PERL_CORE

==== //depot/maint-5.8/perl/global.sym#17 (text+w) ====
Index: perl/global.sym
--- perl/global.sym#16~20064~   Mon Jul  7 22:01:15 2003
+++ perl/global.sym     Thu Jul 10 11:06:05 2003
@@ -421,6 +421,7 @@
 Perl_scan_num
 Perl_scan_oct
 Perl_screaminstr
+Perl_csighandler
 Perl_stack_grow
 Perl_start_subparse
 Perl_sv_2bool

==== //depot/maint-5.8/perl/malloc.c#6 (text) ====
Index: perl/malloc.c
--- perl/malloc.c#5~20072~      Tue Jul  8 02:24:42 2003
+++ perl/malloc.c       Thu Jul 10 11:06:05 2003
@@ -566,6 +566,9 @@
        union   overhead *ov_next;      /* when free */
 #if MEM_ALIGNBYTES > 4
        double  strut;                  /* alignment problems */
+#  if MEM_ALIGNBYTES > 8
+       char    sstrut[MEM_ALIGNBYTES]; /* for the sizing */
+#  endif
 #endif
        struct {
 /*

==== //depot/maint-5.8/perl/perl.c#43 (text) ====
Index: perl/perl.c
--- perl/perl.c#42~20067~       Mon Jul  7 22:39:14 2003
+++ perl/perl.c Thu Jul 10 11:06:05 2003
@@ -3098,10 +3098,12 @@
                 PL_statbuf.st_mode & (S_ISUID|S_ISGID))
             {
                 /* try again */
+                PERL_FPU_PRE_EXEC
                 PerlProc_execv(Perl_form(aTHX_ "%s/sperl"PERL_FS_VER_FMT,
                                          BIN_EXP, (int)PERL_REVISION,
                                          (int)PERL_VERSION,
                                          (int)PERL_SUBVERSION), PL_origargv);
+                PERL_FPU_POST_EXEC
                 Perl_croak(aTHX_ "Can't do setuid\n");
             }
 #       endif
@@ -3358,9 +3360,11 @@
            (void)PerlIO_close(PL_rsfp);
 #ifndef IAMSUID
            /* try again */
+           PERL_FPU_PRE_EXEC
            PerlProc_execv(Perl_form(aTHX_ "%s/sperl"PERL_FS_VER_FMT, BIN_EXP,
                                     (int)PERL_REVISION, (int)PERL_VERSION,
                                     (int)PERL_SUBVERSION), PL_origargv);
+           PERL_FPU_POST_EXEC
 #endif
            Perl_croak(aTHX_ "Can't do setuid\n");
        }
@@ -3442,9 +3446,11 @@
 #if defined(HAS_FCNTL) && defined(F_SETFD)
     fcntl(PerlIO_fileno(PL_rsfp),F_SETFD,0);   /* ensure no close-on-exec */
 #endif
+    PERL_FPU_PRE_EXEC
     PerlProc_execv(Perl_form(aTHX_ "%s/perl"PERL_FS_VER_FMT, BIN_EXP,
                             (int)PERL_REVISION, (int)PERL_VERSION,
                             (int)PERL_SUBVERSION), PL_origargv);/* try again */
+    PERL_FPU_POST_EXEC
     Perl_croak(aTHX_ "Can't do setuid\n");
 #endif /* IAMSUID */
 #else /* !DOSUID */

==== //depot/maint-5.8/perl/perl.h#38 (text) ====
Index: perl/perl.h
--- perl/perl.h#37~19991~       Fri Jul  4 06:54:33 2003
+++ perl/perl.h Thu Jul 10 11:06:05 2003
@@ -1971,11 +1971,17 @@
 #    define PERL_FPU_INIT fpsetmask(0);
 #  else
 #    if defined(SIGFPE) && defined(SIG_IGN)
-#      define PERL_FPU_INIT signal(SIGFPE, SIG_IGN);
+#      define PERL_FPU_INIT       PL_sigfpe_saved = signal(SIGFPE, SIG_IGN)
+#      define PERL_FPU_PRE_EXEC   { Sigsave_t xfpe; rsignal_save(SIGFPE, 
PL_sigfpe_saved, &xfpe);
+#      define PERL_FPU_POST_EXEC    rsignal_restore(SIGFPE, &xfpe); }
 #    else
 #      define PERL_FPU_INIT
 #    endif
 #  endif
+#endif
+#ifndef PERL_FPU_PRE_EXEC
+#  define PERL_FPU_PRE_EXEC   {
+#  define PERL_FPU_POST_EXEC  }
 #endif
 
 #ifndef PERL_SYS_INIT3

==== //depot/maint-5.8/perl/perlapi.h#23 (text+w) ====
Index: perl/perlapi.h
--- perl/perlapi.h#22~20115~    Thu Jul 10 08:11:29 2003
+++ perl/perlapi.h      Thu Jul 10 11:06:05 2003
@@ -1002,6 +1002,8 @@
 #define PL_patleave            (*Perl_Gpatleave_ptr(NULL))
 #undef  PL_sh_path
 #define PL_sh_path             (*Perl_Gsh_path_ptr(NULL))
+#undef  PL_sigfpe_saved
+#define PL_sigfpe_saved                (*Perl_Gsigfpe_saved_ptr(NULL))
 #undef  PL_thr_key
 #define PL_thr_key             (*Perl_Gthr_key_ptr(NULL))
 

==== //depot/maint-5.8/perl/perlvars.h#11 (text) ====
Index: perl/perlvars.h
--- perl/perlvars.h#10~19991~   Fri Jul  4 06:54:33 2003
+++ perl/perlvars.h     Thu Jul 10 11:06:05 2003
@@ -55,3 +55,7 @@
 /* This is constant on most architectures, a global on OS/2 */
 PERLVARI(Gsh_path,     char *, SH_PATH)/* full path of shell */
 
+/* If Perl has to ignore SIGPFE, this is its saved state.
+ * See perl.h macros PERL_FPU_INIT and PERL_FPU_{PRE,POST}_EXEC. */
+PERLVAR(Gsigfpe_saved, Sighandler_t)
+

==== //depot/maint-5.8/perl/pod/perlhist.pod#3 (text) ====
Index: perl/pod/perlhist.pod
--- perl/pod/perlhist.pod#2~19061~      Wed Mar 26 11:23:37 2003
+++ perl/pod/perlhist.pod       Thu Jul 10 11:06:05 2003
@@ -363,6 +363,8 @@
           5.8.0-RC2     2002-Jun-21
           5.8.0-RC3     2002-Jul-13
           5.8.0         2002-Jul-18
+          5.8.1-RC1     2003-Jul-10
+          5.8.1-RC2     2002-Jul-11
 
 =head2 SELECTED RELEASE SIZES
 

==== //depot/maint-5.8/perl/toke.c#25 (text) ====
Index: perl/toke.c
--- perl/toke.c#24~20101~       Wed Jul  9 10:49:23 2003
+++ perl/toke.c Thu Jul 10 11:06:05 2003
@@ -2701,7 +2701,9 @@
                    else
                        newargv = PL_origargv;
                    newargv[0] = ipath;
+                   PERL_FPU_PRE_EXEC
                    PerlProc_execv(ipath, EXEC_ARGV_CAST(newargv));
+                   PERL_FPU_POST_EXEC
                    Perl_croak(aTHX_ "Can't exec %s", ipath);
                }
 #endif
End of Patch.

Reply via email to