develooper Front page | perl.perl5.porters | Postings from March 2011

[perl #85528] Re-evals break Unicode char classes (Bleadperl breaks JE)

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
March 6, 2011 14:17
Subject:
[perl #85528] Re-evals break Unicode char classes (Bleadperl breaks JE)
Message ID:
rt-3.6.HEAD-4136-1299449847-1469.85528-15-0@perl.org
On Sun Mar 06 13:43:44 2011, sprout wrote:
> I’ve reduced it to this:
> 
> $ ./miniperl -Ilib -le 'print "\x{100}" =~ /(?{})[\x{100}]/'
> 
> $ ./miniperl -Ilib -le 'print "\x{100}" =~ /[\x{100}]/'
> 1

This was caused by:

commit 137165a601b852a9679983cdfe8d35be29f0939c
Author: Karl Williamson <public@khwilliamson.com>
Date:   Fri Feb 25 20:10:47 2011 -0700

    Free up bit in ANYOF flags
    
    This is the foundation for fixing the regression RT #82610.  My analysis
    was wrong that two bits could be shared, at least not without further
    work.  This changes to use a different mechanism to pass needed
    information to regexec.c so that another bit can be freed up and, in a
    later commit, the two bits can become unshared again.
    
    The bit that is freed up is ANYOF_UTF8, which basically said there is
    something that is matched outside the ANYOF bitmap, and requires the
    target string to be in utf8.  This changes things so the existence of
    something besides the bitmap indicates this, and so no flag is needed.
    The flag bit ANYOF_NONBITMAP_NON_UTF8 remains to indicate that there is
    something that should be matched outside the bitmap even if the target
    string isn't in utf8.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About