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
segfault with s/(.)\G//g #9864
Comments
From @ntyniThis is a bug report for perl from Niko Tyni <ntyni@debian.org>, As reported by Raphael Geissert in <http://bugs.debian.org/545234>: $ echo foo | perl -pe "s/(.)\G//g" crashes on 5.10.0, 5.10.1 and current blead. Backtrace: Core was generated by `./miniperl -pe s/(.)\G//g'. Flags: Site configuration information for perl 5.11.0: Configured by Debian Project at Tue Sep 8 09:40:07 EEST 2009. Summary of my perl5 (revision 5 version 11 subversion 0) configuration: Locally applied patches: @INC for perl 5.11.0: Environment for perl 5.11.0: |
From @demerphqHi, thanks for the report. I have resolved this in bleadperl with commit: http://perl5.git.perl.org/perl.git/commitdiff/c584a96ef5d commit c584a96 Fix RT69056 - postive GPOS leads to segv on first match |
The RT System itself - Status changed from 'new' to 'open' |
@demerphq - Status changed from 'open' to 'resolved' |
From @CorionHello, I can reproduce the bug on Win32 - attached is a patch with a test file. -max |
From @Corion0001-Add-test-for-perl-69056.patchFrom f65553dbe4d6038b46a3e6d510e2d8becf9d903f Mon Sep 17 00:00:00 2001
From: Max Maischein <corion@corion.net>
Date: Wed, 9 Sep 2009 23:48:23 +0200
Subject: [PATCH] Add test for [perl #69056]
---
t/op/rt69056.t | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
create mode 100644 t/op/rt69056.t
diff --git a/t/op/rt69056.t b/t/op/rt69056.t
new file mode 100644
index 0000000..23c4f08
--- /dev/null
+++ b/t/op/rt69056.t
@@ -0,0 +1,22 @@
+#!perl -w
+
+=head1 DESCRIPTION
+
+This test tests against a regular expression bug
+that leads to a segfault
+
+The bug was reported in [perl #69056] by Niko Tyni
+
+=cut
+
+use strict;
+use Test::More tests => 1;
+
+TODO: {
+ local $TODO = 'Fix regex engine segfault';
+
+ $_='foo';
+ s/(.)\G//g;
+
+ ok(1, 'Did not segfault');
+};
\ No newline at end of file
--
1.6.0.2.1172.ga5ed0
|
From @demerphq2009/9/9 Max Maischein <corion@corion.net>:
Can you reproduce it after my patch? Also the test, since it involves a segv perl, should probably be run Hrm, or maybe it doesnt matter as the script is standalone. Not sure Schwern? Yves -- |
From @nwc10On Thu, Sep 10, 2009 at 11:15:19AM +0200, demerphq wrote:
I'd prefer fresh_perl_is() or fresh_perl_like() over a proliferation of IIRC Schwern wrote them to remove t/op/misc.t, which had been the home for Nicholas Clark |
From @demerphq2009/9/10 Nicholas Clark <nick@ccl4.org>:
Yes, this should probably go in a new test file called Or possibly t/op/pat.t, but id like to see that split up in multiple Can we maybe create t/op/regex/ and put anything intended to test cheers -- |
From @nwc10On Thu, Sep 10, 2009 at 11:33:54AM +0200, demerphq wrote:
No, but probably t/regex/ would be better, as regexps are smeared across IIRC new directories need to be added to t/TEST and t/harness, and there Nicholas Clark |
From @demerphq2009/9/10 Nicholas Clark <nick@ccl4.org>:
Ah, good point, I had been think of "t/op" as "test internal perl
Seems like, what was the term you used, "a small self contained task So ill give it a crack. cheers, -- |
From @Coriondemerphq schrieb:
-max |
From @Corion0001-Add-test-for-perl-69056-2nd-try.patchFrom 908fda5755f791c36e08e69f397e4a24de0e1a28 Mon Sep 17 00:00:00 2001
From: Max Maischein <corion@corion.net>
Date: Thu, 10 Sep 2009 13:15:02 +0200
Subject: [PATCH] Add test for [perl #69056], 2nd try
---
t/op/rt69056.t | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
create mode 100644 t/op/rt69056.t
diff --git a/t/op/rt69056.t b/t/op/rt69056.t
new file mode 100644
index 0000000..bbbc1ed
--- /dev/null
+++ b/t/op/rt69056.t
@@ -0,0 +1,19 @@
+#!perl -w
+
+=head1 DESCRIPTION
+
+This test tests against a regular expression bug
+that leads to a segfault
+
+The bug was reported in [perl #69056] by Niko Tyni
+
+=cut
+
+use strict;
+require 't/test.pl';
+
+fresh_perl_is(
+ '$_=q(foo);s/(.)\G//g;print'
+ => 'foo',
+ '[perl #69056] positive GPOS regex segfault'
+);
--
1.6.0.2.1172.ga5ed0
|
From ams@toroid.orgAt 2009-09-10 13:15:48 +0200, corion@corion.net wrote:
Thanks, applied. (#ac93a5c) -- ams |
From @demerphq2009/9/10 Abhijit Menon-Sen <ams@toroid.org>:
And reverted/changed with 831a7dd so I used your name for the commit Max. cheers, -- |
From @demerphq2009/9/10 Nicholas Clark <nick@ccl4.org>:
FYI: I created t/re/ and moved the regex tests that were in t/op/ to http://perl5.git.perl.org/perl.git/commitdiff/a4499558e Yves -- |
Migrated from rt.perl.org#69056 (status was 'resolved')
Searchable as RT69056$
The text was updated successfully, but these errors were encountered: