-
Notifications
You must be signed in to change notification settings - Fork 555
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
script runs can panic on some inputs #16546
Comments
From @khwilliamsonThis is a bug report for perl from khw@khw.(none), The script feature in regexes can panic. This happens when some memory I don't know what to do about a test. I can figure out a test that's Flags: Site configuration information for perl 5.28.0: Configured by khw at Tue May 1 10:52:11 MDT 2018. Summary of my perl5 (revision 5 version 28 subversion 0) configuration: @INC for perl 5.28.0: Environment for perl 5.28.0: PATH=/usr/lib/ccache:/home/khw/bin:/home/khw/perl5/perlbrew/bin:/home/khw/print/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/usr/games:/usr/local/games:/home/khw/iands/www:/home/khw/cxoffice/bin |
From @jkeenanOn Fri, 04 May 2018 21:34:24 GMT, public@khwilliamson.com wrote:
Given the murkiness of the situation, I would be surprised if we can find a solution in time for perl-5.28.0. We should therefore consider yanking it from blead. Thank you very much. -- |
The RT System itself - Status changed from 'new' to 'open' |
From @khwilliamsonOn 05/04/2018 08:09 PM, James E Keenan via RT wrote:
I don't see that the situation is murky at all. Attached is a patch Note that this feature is marked experimental. |
From @khwilliamson0039-PATCH-perl-133175-script-run-free-from-wrong-pool-pa.patchFrom 9ef19eee5bfe6edfc9688b38e6a131175f006f39 Mon Sep 17 00:00:00 2001
From: Karl Williamson <khw@cpan.org>
Date: Fri, 4 May 2018 21:26:31 -0600
Subject: [PATCH 39/39] PATCH: [perl #133175] script run free from wrong pool
panic
Setting the pointer to NULL after freeing signals the code in later
interations that it has been freed already
---
regexec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/regexec.c b/regexec.c
index 9a5e87e9e5..56d5b10fd8 100644
--- a/regexec.c
+++ b/regexec.c
@@ -10583,9 +10583,11 @@ Perl_isSCRIPT_RUN(pTHX_ const U8 * s, const U8 * send, const bool utf8_target)
/* If there is only a single script in common, set to that.
* Otherwise, use the intersection going forward */
Safefree(intersection);
+ intersection = NULL;
if (intersection_len == 1) {
script_of_run = script_of_char = new_overlap[0];
Safefree(new_overlap);
+ new_overlap = NULL;
}
else {
intersection = new_overlap;
--
2.11.0
|
From @xsawyerxOn 05/05/2018 06:36 AM, Karl Williamson wrote:
Agreed.
Do you think it should be merged now? |
From @khwilliamsonOn 05/09/2018 01:09 PM, Sawyer X via RT wrote:
Yes. |
From @xsawyerxOn 05/09/2018 10:22 PM, Karl Williamson wrote:
Go for it. |
From @khwilliamsonThis was fixed by |
@khwilliamson - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#133175 (status was 'resolved')
Searchable as RT133175$
The text was updated successfully, but these errors were encountered: