-
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
formline segfaults #14388
Comments
From mlelstv@serpens.deCreated by mlelstv@serpens.deThis is a bug report for perl from mlelstv@serpens.de, ----------------------------------------------------------------- The core file shows the following backtrace: #0 0xbbb5dfcc in Perl_pp_formline () The segfault seems to occur at the following code fragment in pp_ctl.c: case FF_MORE: /* replace long end of string with '...' */ when accessing *s though a NULL pointer. send = item + len isSPACE(*s) s < send while s < send s++ isSPACE(*s) The code changed in perl-5.20, the older version 5.18 does not have Perl Info
|
From @jkeenanOn Sat Jan 03 07:12:24 2015, mlelstv@serpens.de wrote:
Here's the end of the output I got from running: fix chop formats with non PV vars :100644 100644 1ab3f420544ec457c657c55a2565764be2443374 95727f201a6194eb125a2c162892eea538601dc8 M pp_ctl.c ##### -- |
The RT System itself - Status changed from 'new' to 'open' |
From @tonycozOn Sat Jan 03 07:12:24 2015, mlelstv@serpens.de wrote:
I think the attached is the correct fix, but it still needs tests. Tony |
From @tonycoz0001-perl-123538-always-set-chophere-and-itembytes-at-the.patchFrom 1329d991a175a067c6bf27a6e6128a0c78ba0e20 Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Mon, 12 Jan 2015 15:10:43 +1100
Subject: [PATCH] [perl #123538] always set chophere and itembytes at the same
time
---
pp_ctl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/pp_ctl.c b/pp_ctl.c
index d69710c..1f77241 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -586,6 +586,7 @@ PP(pp_formline)
break;
}
itembytes = s - item;
+ chophere = s;
break;
}
--
1.7.10.4
|
From @tonycozOn Sun Jan 11 20:11:54 2015, tonyc wrote:
With a test, I'll apply it in a couple of days. Tony |
From @tonycoz0001-perl-123538-always-set-chophere-and-itembytes-at-the.patchFrom 16c22aedb5255e822176c7ec900471bcb4cb8873 Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Mon, 12 Jan 2015 15:10:43 +1100
Subject: [PATCH] [perl #123538] always set chophere and itembytes at the same
time
Previously this would crash in FF_MORE because chophere was still
NULL.
---
pp_ctl.c | 1 +
t/op/write.t | 14 +++++++++++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/pp_ctl.c b/pp_ctl.c
index 37b822c..c76347b 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -586,6 +586,7 @@ PP(pp_formline)
break;
}
itembytes = s - item;
+ chophere = s;
break;
}
diff --git a/t/op/write.t b/t/op/write.t
index 4b13057..590d658 100644
--- a/t/op/write.t
+++ b/t/op/write.t
@@ -98,7 +98,7 @@ for my $tref ( @NumTests ){
my $bas_tests = 21;
# number of tests in section 3
-my $bug_tests = 66 + 3 * 3 * 5 * 2 * 3 + 2 + 66 + 4 + 2 + 3 + 96 + 11 + 2;
+my $bug_tests = 66 + 3 * 3 * 5 * 2 * 3 + 2 + 66 + 4 + 2 + 3 + 96 + 11 + 3;
# number of tests in section 4
my $hmb_tests = 37;
@@ -1960,6 +1960,18 @@ dd|
EXPECT
{ stderr => 1 }, '#123245 different panic in sv_chop');
+fresh_perl_is(<<'EOP', <<'EXPECT',
+format STDOUT =
+# x at the end to make the spaces visible
+@... x
+q/a/
+.
+write;
+EOP
+a x
+EXPECT
+ { stderr => 1 }, '#123538 crash in FF_MORE');
+
#############################
## Section 4
## Add new tests *above* here
--
1.7.10.4
|
From @tonycozOn Mon Jan 12 16:15:23 2015, tonyc wrote:
Applied as 62db6ea. This also fixed 123633 and 123591. I wonder if there was some sort of format tutorial recently - 3 reports for this bug and 123245 in December. Tony |
@tonycoz - Status changed from 'open' to 'pending release' |
From mlelstv@serpens.deOn Sun, Jan 18, 2015 at 09:32:50PM -0800, Tony Cook via RT wrote:
This bug here was triggered by the Amanda backup software Greetings, |
From @khwilliamsonThanks for submitting this ticket The issue should be resolved with the release today of Perl v5.22, available at http://www.perl.org/get.html -- |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#123538 (status was 'resolved')
Searchable as RT123538$
The text was updated successfully, but these errors were encountered: