Perl 4.036 - segmentation voilation in scanpat +FIX 
Author Message
 Perl 4.036 - segmentation voilation in scanpat +FIX


Received: by screamer.nevada.edu; id AA05054; Mon, 26 Sep 1994 16:53:24 -0700

Date: Mon, 26 Sep 1994 16:53:19 -0700



Subject: Usenet posting

At least on the DEC alpha (3000/400 OSF/1 3.0) perl-4.036 aborts with a

The way that I found this out was trying to install the mail-audit package
to filter my incoming mail. The patch checks to see if there is anything

tests pass and the mail filter is working for me.

Anyway, here is a patch file to fix this problem. This patch also has
another one in it from Mike Iglesias from the alpha-osf-managers mailling
list. This patch is against original source for perl 4.036

*** ../src/toke.c       Mon Feb 08 12:37:46 1993
--- toke.c      Mon Sep 26 14:40:59 1994
***************
*** 1749,1769 ****
            arg->arg_type = O_ITEM;
            arg[1].arg_type = A_DOUBLE;
            arg[1].arg_ptr.arg_str = str_smake(str);
!           d = scanident(d,bufend,buf);
!           (void)stabent(buf,TRUE);            /* make sure it's created */
!           for (; d < e; d++) {
                if (*d == '\\')
!                   d++;
                else if (*d == '$' && d[1] && d[1] != '|' && d[1] != ')') {
!                   d = scanident(d,bufend,buf);
!                   (void)stabent(buf,TRUE);
                }

!                   d = scanident(d,bufend,buf);
!                   if (strEQ(buf,"ARGV") || strEQ(buf,"ENV") ||
                      strEQ(buf,"SIG") || strEQ(buf,"INC"))
!                       (void)stabent(buf,TRUE);
                }
            }
            goto got_pat;               /* skip compiling for now */
        }
--- 1749,1771 ----
            arg->arg_type = O_ITEM;
            arg[1].arg_type = A_DOUBLE;
            arg[1].arg_ptr.arg_str = str_smake(str);
!           if (e-d > 1) {
!             d = scanident(d,e,buf);
!             (void)stabent(buf,TRUE);          /* make sure it's created */
!             for (; d < e; d++) {
                if (*d == '\\')
!                 d++;
                else if (*d == '$' && d[1] && d[1] != '|' && d[1] != ')') {
!                 d = scanident(d,e,buf);
!                 (void)stabent(buf,TRUE);
                }

!                 d = scanident(d,e,buf);
!                 if (strEQ(buf,"ARGV") || strEQ(buf,"ENV") ||
                      strEQ(buf,"SIG") || strEQ(buf,"INC"))
!                   (void)stabent(buf,TRUE);
                }
+             }
            }
            goto got_pat;               /* skip compiling for now */
        }



Sat, 15 Mar 1997 08:04:58 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Perl 4.036 on DEC-ALPHA-OSF/1 gives Segmentation Fault

2. Perl 4.036 dump core on Alpha - a reason and a fix

3. perl 4.036 regexp bug (with fix)

4. Bug fix in PERL 4.036

5. Perl 5 and Perl 4.036 bug: "caller" is broken. 1 line fix described

6. Describe Perl Symbol version 1.8 for perl 4.036

7. PERL 4.036 or Perl 5.x with Unixware 2.1

8. Perl 5.001 vs Perl 4.036...

9. Converting from Perl 4.036 to Perl 5.0

10. Memory fault from perl 4.035 (on BSDI) is 4.036 a fix?

11. Numbers larger than 32k in perl 4.036?

12. socket problems with perl 4.036

 

 
Powered by phpBB® Forum Software