-
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
charset.t and subst.t fail on Solaris under -Duse64bitall #15240
Comments
From @khwilliamsonThis is a recently introduced bug, in the last month or so. It is failing some locale-related tests. When I run a sample test by hand from the command line, it works. Under DEBUGGING, it works, as well as use re Debug. I'm having trouble bisecting on that platform |
From @khwilliamsonThere are also some other failures now, under threads ../t/re/subst.t.............................................FAILED -- |
From @khwilliamsonTony Cook bisected the charset to commit ba6840f fix Perl #126182, out of memory due to infinite pattern recursion I'll look to see if that is also the source of the subst.t problems. |
@khwilliamson - Status changed from 'new' to 'open' |
From @khwilliamsonOn Wed Mar 23 15:52:48 2016, khw wrote:
And it is the source for subst.t |
From @iabynOn Thu, Mar 24, 2016 at 04:56:44PM -0700, Karl Williamson via RT wrote:
Are any of the usual suspects (Karl, Yves, Tony) already actively looking -- |
From @rjbs* Dave Mitchell <davem@iabyn.com> [2016-04-01T10:36:54]
I emailed Yves just this morning to ask him to have a look. -- |
From @demerphqOn 1 April 2016 at 16:36, Dave Mitchell <davem@iabyn.com> wrote:
I don't have access to Solaris, and I cannot replicate on my box. I commit 595de76 fix perl #127705, incorrect restoration of state during EVAL/GOSUB We were not restoring the cur_curlyx property properly during our funky commit d1c49ad add consistency with other union members In most cases the curlyx member is the first thing after the yes state commit 401a802 [perl #126182] rework pattern GOSUB infinite recursion detection In ba6840f I tried to fix There were two problems with that patch, both pointed out by The second patch was that it ignored some subtleties in how Thanks for Zefram for the feedback on the original patch. Cheers, -- |
From @iabynOn Sun, Apr 03, 2016 at 10:55:10AM +0200, demerphq wrote:
I can replicate it on Solaris. It can be reduced to this code: use POSIX; my $a = "A"; Solaris fails to match. Putting debugging printf's in S_regmatch() around the line: while (scan != NULL) { which converts it to: if (PL_debug) if (PL_debug) while (scan != NULL) { shows that when first entering the loop while executing the qr/.\b$/l, at while top: PL_charclass[n]=0x90e400 i.e. PL_charclass appears to get corrupted when entering the while loop. -- |
From @khwilliamsonOn 04/03/2016 03:01 PM, Dave Mitchell via RT wrote:
PL_charclass is supposed to be const |
From @iabynOn Sun, Apr 03, 2016 at 11:04:30PM -0600, Karl Williamson wrote:
Provisionally fixed by the commit shown below - but we'll have to see what I'm also slightly uncomfortable with putting lines like the following +#if (defined(__SUNPRO_C) && (__SUNPRO_C == 0x5120) && defined(__x86_64) && defined(USE_64_BIT_ALL)) so I'm open to suggestions on how to improve this commit. commit c5d7841 S_regmatch(): work around Solaris optimiser bug Affected files ... Differences ... Inline Patchdiff --git a/regexec.c b/regexec.c
index 0c549df..9acb5a0 100644
--- a/regexec.c
+++ b/regexec.c
@@ -5232,6 +5232,13 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
bool is_utf8_pat = reginfo->is_utf8_pat;
bool match = FALSE;
+/* Solaris Studio 12.3 messes up fetching PL_charclass['\n'] */
+#if (defined(__SUNPRO_C) && (__SUNPRO_C == 0x5120) && defined(__x86_64) && defined(USE_64_BIT_ALL))
+# define SOLARIS_BAD_OPTIMIZER
+ const U32 *pl_charclass_dup = PL_charclass;
+# define PL_charclass pl_charclass_dup
+#endif
+
#ifdef DEBUGGING
GET_RE_DEBUG_FLAGS_DECL;
#endif
@@ -8316,6 +8323,9 @@ NULL
/* NOTREACHED */
}
}
+#ifdef SOLARIS_BAD_OPTIMIZER
+# undef pl_charclass_dup
+#endif
/*
* We get here only if there's trouble -- normally "case END" is
-- Art is anything that has a label (especially if the label is "untitled 1") |
From @iabynOn Mon, Apr 04, 2016 at 02:39:00PM +0100, Dave Mitchell wrote:
... plus follow-up: commit 1994952 Follow-up to previous Solaris/S_regmatch commit Affected files ... Differences ... Inline Patchdiff --git a/regexec.c b/regexec.c
index 9acb5a0..cdaa95c 100644
--- a/regexec.c
+++ b/regexec.c
@@ -8324,7 +8324,7 @@ NULL
}
}
#ifdef SOLARIS_BAD_OPTIMIZER
-# undef pl_charclass_dup
+# undef PL_charclass
#endif
/*
-- Technology is dominated by two types of people: those who understand what |
From @khwilliamsonThese patches fix the problem on our Solaris smokers |
@khwilliamson - Status changed from 'open' to 'pending release' |
From @khwilliamsonThank you for submitting this report. You have helped make Perl better. Perl 5.24.0 may be downloaded via https://metacpan.org/release/RJBS/perl-5.24.0 |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#127746 (status was 'resolved')
Searchable as RT127746$
The text was updated successfully, but these errors were encountered: