[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl5-changes
Subject:    Change 34144: Fix use of a variable before it is initialised, introduced by change
From:       Nicholas Clark <nwc10+p5p4 () colon ! colondot ! net>
Date:       2008-07-15 15:00:04
Message-ID: 20080715150004.6AB705003D () mx ! activestate ! com
[Download RAW message or body]

Change 34144 by nicholas@nicholas-saigo on 2008/07/15 14:51:53

	Fix use of a variable before it is initialised, introduced by change
	34138, spotted by Jerry D. Hedden. I assume that he's compiling with
	options that enable trace flow analysis from the C compiler.

Affected files ...

... //depot/perl/sv.c#1548 edit

Differences ...

==== //depot/perl/sv.c#1548 (text) ====
Index: perl/sv.c
--- perl/sv.c#1547~34138~	2008-07-13 13:22:25.000000000 -0700
+++ perl/sv.c	2008-07-15 07:51:53.000000000 -0700
@@ -4402,11 +4402,11 @@
     }
     /* SvPVX(sv) may move in SV_CHECK_THINKFIRST(sv), but after this line,
        nothing uses the value of ptr any more.  */
+    max_delta = SvLEN(sv) ? SvLEN(sv) : SvCUR(sv);
     if (ptr <= SvPVX_const(sv))
 	Perl_croak(aTHX_ "panic: sv_chop ptr=%p, start=%p, end=%p",
 		   ptr, SvPVX_const(sv), SvPVX_const(sv) + max_delta);
     SV_CHECK_THINKFIRST(sv);
-    max_delta = SvLEN(sv) ? SvLEN(sv) : SvCUR(sv);
     if (delta > max_delta)
 	Perl_croak(aTHX_ "panic: sv_chop ptr=%p (was %p), start=%p, end=%p",
 		   SvPVX_const(sv) + delta, ptr, SvPVX_const(sv),
End of Patch.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic