New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perl-5.10.x + bignum assertion #9747
Comments
From @nwc10Merijn mailed p5p in 20081112130021.70f86340@pc09.procura.nl --8<--- test.pl use bignum; while (<DATA>) { @x = split m/,/, $_, -1; my ($dev, $mnt, $size, $used, $free, $fstype, $fill) __END__ $ perl test.pl Dave notes that it appears to be a regression from 588, and doesn't fail in |
From alex@chmrr.netOn Thu May 28 07:47:51 2009, nicholas wrote:
05ef5f8 added this assertion, which |
From alex@chmrr.net0001-Fix-RT-66098-stricter-checking-on-SvIVX-exposed-a-la.patchFrom 23ed851214bb669bf80d74dd6c1ebcf210233ef7 Mon Sep 17 00:00:00 2001
From: Alex Vandiver <alexmv@mit.edu>
Date: Thu, 28 May 2009 16:27:25 -0400
Subject: [PATCH] Fix [RT#66098] -- stricter checking on SvIVX exposed a lack of SvIOK check
---
op.c | 2 +-
t/op/split.t | 8 +++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/op.c b/op.c
index 246c843..facb884 100644
--- a/op.c
+++ b/op.c
@@ -4298,7 +4298,7 @@ Perl_newASSIGNOP(pTHX_ I32 flags, OP *left, I32 optype, OP *right)
((LISTOP*)right)->op_last->op_type == OP_CONST)
{
SV *sv = ((SVOP*)((LISTOP*)right)->op_last)->op_sv;
- if (SvIVX(sv) == 0)
+ if (SvIOK(sv) && SvIVX(sv) == 0)
sv_setiv(sv, PL_modcount+1);
}
}
diff --git a/t/op/split.t b/t/op/split.t
index 025327f..b3a9741 100755
--- a/t/op/split.t
+++ b/t/op/split.t
@@ -6,7 +6,7 @@ BEGIN {
require './test.pl';
}
-plan tests => 135;
+plan tests => 136;
$FS = ':';
@@ -358,3 +358,9 @@ ok(@ary == 3 &&
is($s[2]," XYZ");
is(join(':',@s), join(':',@r));
}
+
+{
+ use constant BANG => {};
+ () = split m/,/, "", BANG;
+ ok(1);
+}
--
1.6.3.204.g8c948
|
The RT System itself - Status changed from 'new' to 'open' |
@nwc10 - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#66098 (status was 'resolved')
Searchable as RT66098$
The text was updated successfully, but these errors were encountered: