-
Notifications
You must be signed in to change notification settings - Fork 560
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
SUMMARY: AddressSanitizer: heap-use-after-free #16817
Comments
From hersheys.ryan@gmail.comTriggered fuzzing Perl 5.29.2 ================================================================= 0x61900000a478 is located 1016 bytes inside of 1024-byte region previously allocated by thread T0 here: SUMMARY: AddressSanitizer: heap-use-after-free Summary of my perl5 (revision 5 version 29 subversion 2) configuration: Characteristics of this binary (from libperl): |
From @tonycozOn Fri, 18 Jan 2019 19:33:50 -0800, hersheys.ryan@gmail.com wrote:
The attached should fix it. Tony |
From @tonycoz0001-perl-133778-adjust-MARK-if-we-extend-the-stack-in-pp.patchFrom e55ae7fab990c07cccf1293beecfc388fa0990ab Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Wed, 6 Feb 2019 10:37:58 +1100
Subject: (perl #133778) adjust MARK if we extend the stack in pp_repeat
for a list repeat in scalar/void context
---
pp.c | 3 ++-
t/op/repeat.t | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 85 insertions(+), 2 deletions(-)
diff --git a/pp.c b/pp.c
index 522e985931..19f96f933a 100644
--- a/pp.c
+++ b/pp.c
@@ -1694,7 +1694,8 @@ PP(pp_repeat)
else {
dTOPss;
ASSUME(MARK + 1 == SP);
- XPUSHs(sv);
+ MEXTEND(SP, 1);
+ PUSHs(sv);
MARK[1] = &PL_sv_undef;
}
SP = MARK + 2;
diff --git a/t/op/repeat.t b/t/op/repeat.t
index 978916689b..fa7ce06904 100644
--- a/t/op/repeat.t
+++ b/t/op/repeat.t
@@ -6,7 +6,7 @@ BEGIN {
set_up_inc( '../lib' );
}
-plan(tests => 49);
+plan(tests => 50);
# compile time
@@ -192,3 +192,85 @@ fresh_perl_like(
eval q{() = (() or ((0) x 0)); 1};
is($@, "", "RT #130247");
+
+# yes, the newlines matter
+fresh_perl_is(<<'PERL', "", { stderr => 1 }, "(perl #133778) MARK mishandling");
+map{s[][];eval;0}<DATA>__END__
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+()x0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0
+PERL
--
2.11.0
|
The RT System itself - Status changed from 'new' to 'open' |
From @tonycozOn Tue, 05 Feb 2019 15:41:52 -0800, tonyc wrote:
Applied as d81b773. Tony |
@tonycoz - Status changed from 'open' to 'pending release' |
From @khwilliamsonThank you for filing this report. You have helped make Perl better. With the release today of Perl 5.30.0, this and 160 other issues have been Perl 5.30.0 may be downloaded via: If you find that the problem persists, feel free to reopen this ticket. |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#133778 (status was 'resolved')
Searchable as RT133778$
The text was updated successfully, but these errors were encountered: