-
Notifications
You must be signed in to change notification settings - Fork 567
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
Assertion failure in S_maybe_multideref (op.c:14912) #16969
Comments
From @dur-randirCreated by @dur-randirWhile fuzzing perl v5.29.9-63-g2496d8f3f7 built with afl and run 0for%{scalar local$0[0]} to cause an assertion failure perl: op.c:14912: void S_maybe_multideref(OP *, OP *, UV, U8): GDB stack trace is following #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 This is a regression between 5.20 and 5.22, bisect points to commit fedf30e Add OP_MULTIDEREF This op is an optimisation for any series of one or more array or hash Perl Info
|
From @tonycozOn Thu, 18 Apr 2019 09:51:12 -0700, randir wrote:
I think the check here should be bypassing the OP_SCALAR as it does OP_LIST. Per the attached. Tony |
From @tonycoz0001-perl-134048-prevent-an-erroneous-assertion-on-OP_SCA.patchFrom d5eb166fb069cc1d53da26788049bf715cf68ba2 Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Wed, 24 Apr 2019 11:05:21 +1000
Subject: (perl #134048) prevent an erroneous assertion on OP_SCALAR
---
op.c | 3 ++-
t/op/multideref.t | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/op.c b/op.c
index 1862f1b11b..a4bed9c582 100644
--- a/op.c
+++ b/op.c
@@ -14907,7 +14907,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.11.0
|
The RT System itself - Status changed from 'new' to 'open' |
From @dur-randirCan this patch be applied now? |
@tonycoz - Status changed from 'open' to 'pending release' |
Migrated from rt.perl.org#134045 (status was 'pending release')
Searchable as RT134045$
The text was updated successfully, but these errors were encountered: