develooper Front page | perl.perl5.porters | Postings from February 2015

[perl #123861] check_locale_boundary_crossing assertion failure

Thread Next
From:
Hugo van der Sanden via RT
Date:
February 23, 2015 01:59
Subject:
[perl #123861] check_locale_boundary_crossing assertion failure
Message ID:
rt-4.0.18-17348-1424656742-890.123861-15-0@perl.org
On Sun Feb 22 11:20:18 2015, sprout wrote:
> On Tue Feb 17 18:22:58 2015, hv wrote:
> > Here's a variant that triggers a different assert:
> >
> > % ./perl -Ilib -e '"0\7000"=~m{\C+?0}'
> > \C is deprecated in regex; marked by <-- HERE in m/\C <-- HERE +?0/
> > at
> > -e line 1.
> > perl: regexec.c:6606: S_regmatch: Assertion `n == (32767) || locinput
> > == li' failed.
> > Aborted (core dumped)
> >  %
> 
> I have a debugging 5.14.4 installed, and it doesn’t fail the
> assertion.  When was this bug introduced?

The first case (/\C0/il) bisects to quite recently:

commit 1d39b2cd2a278ed0630f07bd7598726910eb6427
Author: Karl Williamson <khw@cpan.org>
Date:   Fri Dec 26 18:31:04 2014 -0700

    Simplify foldEQ_utf8
    
    This moves the uncommon case of handling inputs under non-UTF-8 locales
    out of this function to the functions it calls, which already have the
    logic to handle it.  This simplifies this function, cutting a couple
    branches each time through the loop from the common usage.
    
    The locale handling is slowed down somewhat, but even if that were a
    concern, another simpler function is normally used for locale handling.
    This gets called only when one or both of the comparison strings is
    UTF-8, which should be comparatively rare for non-UTF8 locales.

The second case was in 5.18:

commit eb72505db041952a73ba9a9f4714951706fda0c3
Author: David Mitchell <davem@iabyn.com>
Date:   Thu Sep 13 19:58:25 2012 +0100

    regmatch(): remove reginput from CURLY etc
    
    reginput mostly tracked locinput, except when regrepeat() was called.
    With a bit of jiggling, it could be eliminated for these blocks of code.
    
    This is part of a campaign to eliminate the reginput variable.

Hugo

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=123861

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