Change 29953 by [EMAIL PROTECTED] on 2007/01/24 17:01:34

        Integrate:
        [ 27792]
        Remove SAVEt_FREESHAREDPV, as nothing is using it, and it isn't catered
        for in Perl_ss_dup, hence nothing is testing it and nothing will alert
        us if it breaks.
        
        [ 27866]
        Add Dave's explainations of why certain pointers are always non-NULL,
        and assert() that it is true.
        
        [ 27869]
        Subject: [PATCH] (tentative) regcomp.c: try convincing Coverity that 
data ptr in study_chunk is non-NULL when needed
        From: [EMAIL PROTECTED] (Jarkko Hietaniemi)
        Message-Id: <[EMAIL PROTECTED]>
        Date: Sun, 16 Apr 2006 12:26:48 +0300 (EEST)
        
        [ 27894]
        Revert 27869 at Jarkko's request.

Affected files ...

... //depot/maint-5.8/perl/regcomp.c#85 integrate
... //depot/maint-5.8/perl/regexec.c#73 edit
... //depot/maint-5.8/perl/scope.c#60 integrate
... //depot/maint-5.8/perl/scope.h#22 integrate

Differences ...

==== //depot/maint-5.8/perl/regexec.c#73 (text) ====
Index: perl/regexec.c
--- perl/regexec.c#72~29949~    2007-01-24 07:28:38.000000000 -0800
+++ perl/regexec.c      2007-01-24 09:01:34.000000000 -0800
@@ -3129,6 +3129,18 @@
                /* No need to save/restore up to this paren */
                I32 parenfloor = scan->flags;
 
+               /* Dave says:
+                  
+                  CURLYX and WHILEM are always paired: they're the moral
+                  equivalent of pp_enteriter anbd pp_iter.
+
+                  The only time next could be null is if the node tree is
+                  corrupt. This was mentioned on p5p a few days ago.
+
+                  See 
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-04/msg00556.html
+                  So we'll assert that this is true:
+               */
+               assert(next);
                if (next && (OP(PREVOPER(next)) == NOTHING)) /* LONGJMP */
                    next += ARG(next);
                cc.oldcc = PL_regcc;
@@ -3152,7 +3164,18 @@
                saySAME(n);
            }
            /* NOTREACHED */
-       case WHILEM: {
+       case WHILEM:
+           /* Dave says:
+
+           st->cc gets initialised by CURLYX ready for use by WHILEM.
+           So again, unless somethings been corrupted, st->cc cannot
+           be null at that point in WHILEM.
+
+           See 
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-04/msg00556.html
+           So we'll assert that this is true:
+           */
+           assert(PL_regcc);
+           {
                /*
                 * This is really hard to understand, because after we match
                 * what we're trying to match, we must make sure the rest of
End of Patch.

Reply via email to