-
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
panic: swash_fetch got swatch of unexpected bit width #14600
Comments
From citrin@citrin.ruAfter upgrading to perl 5.20.2 my code fails with message: Simple test case attached. The bug is subtle and is not reproduced after small modifications to test case (like storing string in intermediate variable). |
From citrin@citrin.ruThere is related issue with utf8 and regexps in perl 5.20.2 This oneliner works correctly on perl 5.20.1 and show wrong result on perl 5.20.2 perl 5.20.1 > perl -C -Mutf8 -E '$x = "Москва"; |
From [Unknown Contact. See original ticket]There is related issue with utf8 and regexps in perl 5.20.2 This oneliner works correctly on perl 5.20.1 and show wrong result on perl 5.20.2 perl 5.20.1 > perl -C -Mutf8 -E '$x = "Москва"; |
From @TuxOn Wed Mar 18 08:45:28 2015, citrin.ru wrote:
=== base/tperl5.8.9 5.008009 x86_64-linux-thread-multi-ld |
The RT System itself - Status changed from 'new' to 'open' |
From @iabynOn Wed, Mar 18, 2015 at 08:45:29AM -0700, Anton V. Yuzhaninov via RT wrote:
It bisects to this: commit 2c1f00b perl #122747: localize PL_curpm to null in _core_swash_init which was cherry-picked into 5.20.2 by -- |
From @iabynOn Wed, Mar 18, 2015 at 09:13:21PM +0000, Dave Mitchell wrote:
I'm just about to have a look at this, in case anyone's already started. -- |
From @iabynOn Thu, Mar 19, 2015 at 03:04:08PM +0000, Dave Mitchell wrote:
I've now pushed the branch smoke-me/davem/save_re for smoking. For maint-5.20, I'm not sure whether its best to revert Yves' commit 9c186b0 Reinstate save_re_context()'s "local $n" action -- |
From @cpansproutOn Fri Mar 20 04:56:03 2015, davem wrote:
I think for that reason it is problematic, not only for maint, but also for blead. We should not internally be resetting the iterator provided for Perl space. This would break: while(my($key,$val) = each %::) { If this is the only possible approach, then it seems that ‘manual’ iterator without using the iterator is the way to go. I think we already have code like that in dump.c.
Is that in utf8_heavy.pl?
Ow. That potentially affects any magical variable read by swash code. Until we find a cleaner solution, wouldn’t it be better to localise only $1, $2 and $3, which are all that utf8_heavy.pl uses? We could, as an interim measure, add a porting test (oh no!) that ensures we do not accidentally add $4 to utf8_heavy.pl without also localising it. Also, if we handle this issue when swashes are loaded, rather than in the regexp engine, wouldn’t the localisation take place less often? Doing the localisation in a different place perhaps should way, though, till after 5.22. After all, we *know* it works in the current spot.
Surely it converts it to lowercase. -- Father Chrysostomos |
From @iabynOn Tue, Mar 24, 2015 at 11:28:27PM -0700, Father Chrysostomos via RT wrote:
Yes, it's the method SWASHNEW() in utf8_heavy.pl.
Note that it isn't just swash code. Any code that "unexpectedly" calls sub TIESCALAR { bless [] } This outputs "xyzfoo" rather than "abcfoo". Note also that save_re_context() isn't called just when loading swatches, Perhaps: * we restore the original behaviour of save_re_context(), that does * Post 5.22, we try and do something more clever.
Damn, no wonder my code has been failing for all these years ;-) -- |
From @cpansproutOn Wed Mar 25 05:11:38 2015, davem wrote:
I think that suggestion is good.
:-) -- Father Chrysostomos |
From @iabynOn Wed, Mar 25, 2015 at 08:45:57AM -0700, Father Chrysostomos via RT wrote:
Now done as smoke-me/davem/save_re2 -- |
From @iabynOn Wed, Mar 25, 2015 at 05:21:56PM +0000, Dave Mitchell wrote:
Now merged into blead as 4e0341d Perl_save_re_context(): re-indent after last commit -- |
@iabyn - Status changed from 'open' to 'pending release' |
From @iabynOn Mon, Mar 30, 2015 at 12:15:42PM +0100, Dave Mitchell wrote:
3553f4f (and 4e0341d) will need cherry-picking for maint-5.20 -- |
From @khwilliamsonThank you for submitting this ticket. The issue should now be resolved with the release today of Perl v5.22, which is available at http://www.perl.org/get.html |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#124109 (status was 'resolved')
Searchable as RT124109$
The text was updated successfully, but these errors were encountered: