[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
[perl #60346] Re: [Bug in maint-perl-latest] utf8+locale substitution cause the Perl interpreter to hang.
# New Ticket Created by yves orton
# Please include the string: [perl #60346]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=60346 >
2008/11/4 Rick Delaney <rick@bort.ca>:
> On Nov 04 2008, demerphq wrote:
>> 2008/11/4 Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>:
>> >>>>>> On Mon, 03 Nov 2008 22:00:07 +0200, Shlomi Fish <shlomif@iglu.org.il> said:
>> >
>> > > When executing the following program (with a UTF-8 character in it) in
>> > > maintperl, the program hangs at the s/// command:
>> >
>> > > <<<<<<<<<<<<<<<<
>> > > #!/usr/bin/perl
>> >
>> > > use strict;
>> > > use warnings;
>> >
>> > > use utf8;
>> > > use locale;
>> >
>> > > my $text = " "\001 ";
>> >
>> > > my $EOS = "\001";
>> > > $text =~ s/(\s\w\.\s+)$EOS/$1/sg;
>> >
>> > > binmode STDOUT, ":utf8";
>> > > print "$text\n";
>> > >>>>>>>>>>>>>>>>
>> >
>> > Binary search reveals, this was fixed by patch 29360.
>>
>> Which is strange, I wouldnt have expected THAT patch to fix anything at all. :-)
>
> Could it have something to do with this question I posed 4 years ago?
>
>>> I also noticed this in regexp.h while trying to track this bug down:
>>>
>>> #define ROPT_CANY_SEEN 0x00800
>>> #define ROPT_SANY_SEEN ROPT_CANY_SEEN /* src bckwrd cmpt */
>>>
>>> /* 0xf800 of reganch is used by PMf_COMPILETIME */
>>>
>>> It looks like PMf_COMPILETIME overlaps with ROPT_CANY_SEEN, specifically
>>> the PMf_LOCALE portion. I don't know what ROPT_CANY_SEEN is; is this ok?
>>> It doesn't look it.
>
> It looks like when you renumbered the flags that PMf_LOCALE (now
> RXf_PMf_LOCALE) and ROPT_CANY_SEEN (now RXf_CANY_SEEN) are no longer the
> same. I still don't know what CANY_SEEN is but I'd guess that it comes
> into play in the above regexp and was formerly screwed up by the "use
> locale".
Yep, that makes sense. Nice detective work/memory.
:-)
Yves
--
perl -Mre=debug -e "/just|another|perl|hacker/"
- References to:
-
Shlomi Fish <shlomif@iglu.org.il>
andreas.koenig.7os6VVqR@franz.ak.mind.de (Andreas J. Koenig)
demerphq <demerphq@gmail.com>
Rick Delaney <rick@bort.ca>
demerphq <demerphq@gmail.com>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]