Change 30211 by [EMAIL PROTECTED] on 2007/02/11 16:20:15

        Subject: [perl #41484] qr// stack bug 
        From: [EMAIL PROTECTED] (via RT) <[EMAIL PROTECTED]>
        Date: Sat, 10 Feb 2007 19:32:17 -0800
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

... //depot/perl/MANIFEST#1519 edit
... //depot/perl/pp_hot.c#503 edit
... //depot/perl/t/op/qrstack.t#1 add

Differences ...

==== //depot/perl/MANIFEST#1519 (text) ====
Index: perl/MANIFEST
--- perl/MANIFEST#1518~30157~   2007-02-07 06:56:05.000000000 -0800
+++ perl/MANIFEST       2007-02-11 08:20:15.000000000 -0800
@@ -3581,6 +3581,7 @@
 t/op/push.t                    See if push and pop work
 t/op/pwent.t                   See if getpw*() functions work
 t/op/qq.t                      See if qq works
+t/op/qrstack.t                 See if qr expands the stack properly
 t/op/quotemeta.t               See if quotemeta works
 t/op/rand.t                    See if rand works
 t/op/range.t                   See if .. works

==== //depot/perl/pp_hot.c#503 (text) ====
Index: perl/pp_hot.c
--- perl/pp_hot.c#502~29977~    2007-01-25 12:57:56.000000000 -0800
+++ perl/pp_hot.c       2007-02-11 08:20:15.000000000 -0800
@@ -1172,7 +1172,8 @@
     if (pm->op_pmdynflags & PMdf_TAINTED)
         SvTAINTED_on(rv);
     sv_magic(sv,(SV*)ReREFCNT_inc(PM_GETRE(pm)), PERL_MAGIC_qr,0,0);
-    RETURNX(PUSHs(rv));
+    XPUSHs(rv);
+    RETURN;
 }
 
 PP(pp_match)

==== //depot/perl/t/op/qrstack.t#1 (text) ====
Index: perl/t/op/qrstack.t
--- /dev/null   2007-01-16 11:55:45.526841103 -0800
+++ perl/t/op/qrstack.t 2007-02-11 08:20:15.000000000 -0800
@@ -0,0 +1,21 @@
+#!./perl
+
+my $test = 1;
+sub ok {
+    my($ok, $name) = @_;
+
+    # You have to do it this way or VMS will get confused.
+    printf "%s %d%s\n", $ok ? "ok" : "not ok",
+                        $test,
+                        defined $name ? " - $name" : '';
+
+    printf "# Failed test at line %d\n", (caller)[2] unless $ok;
+
+    $test++;
+    return $ok;
+}
+
+print "1..1\n";
+
+ok(defined [(1)x127,qr//,1]->[127], "qr// should extend the stack properly");
+
End of Patch.

Reply via email to