Fix an erroneous assertion on OP_SCALAR

This commit is contained in:
Petr Písař 2019-06-25 16:11:22 +02:00
parent 67cb403909
commit 592c794ab8
2 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,50 @@
From 94a2f6a3c87a0795b9b1aabd49616f90c922b835 Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Wed, 24 Apr 2019 11:05:21 +1000
Subject: [PATCH] (perl #134048) prevent an erroneous assertion on OP_SCALAR
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
op.c | 3 ++-
t/op/multideref.t | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/op.c b/op.c
index 98a438d6f2..f63eeadc36 100644
--- a/op.c
+++ b/op.c
@@ -14904,7 +14904,8 @@ S_maybe_multideref(pTHX_ OP *start, OP *orig_o, UV orig_action, U8 hints)
#ifdef DEBUGGING
OP *n = o->op_next;
while (n && ( n->op_type == OP_NULL
- || n->op_type == OP_LIST))
+ || n->op_type == OP_LIST
+ || n->op_type == OP_SCALAR))
n = n->op_next;
assert(n && n->op_type == OP_LEAVE);
#endif
diff --git a/t/op/multideref.t b/t/op/multideref.t
index 12b04536e5..23487ca283 100644
--- a/t/op/multideref.t
+++ b/t/op/multideref.t
@@ -18,7 +18,7 @@ BEGIN {
use warnings;
use strict;
-plan 64;
+plan 65;
# check that strict refs hint is handled
@@ -242,3 +242,5 @@ sub defer {}
::pass("S_maybe_multideref() shouldn't leak on croak");
}
+fresh_perl_is('0for%{scalar local$0[0]}', '', {},
+ "RT #134045 assertion on the OP_SCALAR");
--
2.20.1

View File

@ -176,6 +176,9 @@ Patch23: perl-5.31.0-perl-122112-remove-some-interfering-debug-output.pat
Patch24: perl-5.31.0-134008-More-carefully-ignore-negative-precision-in-s.patch
Patch25: perl-5.31.0-perl-134008-an-alternative-test.patch
# Fix an erroneous assertion on OP_SCALAR, RT#134048, fixed after 5.31.0
Patch26: perl-5.31.0-perl-134048-prevent-an-erroneous-assertion-on-OP_SCA.patch
# Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048
Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch
@ -2719,6 +2722,7 @@ Perl extension for Version Objects
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch200 -p1
%patch201 -p1
@ -2751,6 +2755,7 @@ perl -x patchlevel.h \
'Fedora Patch23: Fix a crash in SIGALARM handler when waiting on a child process to be closed (RT#122112)' \
'Fedora Patch24: Fix a crash with a negative precision in sprintf function (RT#134008)' \
'Fedora Patch25: Fix a crash with a negative precision in sprintf function (RT#134008)' \
'Fedora Patch26: Fix an erroneous assertion on OP_SCALAR (RT#134048)' \
'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \
'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \
%{nil}
@ -5005,6 +5010,7 @@ popd
- Fix a crash in SIGALARM handler when waiting on a child process to be closed
(RT#122112)
- Fix a crash with a negative precision in sprintf function (RT#134008)
- Fix an erroneous assertion on OP_SCALAR (RT#134048)
* Tue Jun 11 2019 Jitka Plesnikova <jplesnik@redhat.com> - 4:5.30.0-439
- Define %%perl_vendor*, %%perl_archlib, %%perl_privlib, because in rpm