develooper Front page | perl.perl5.porters | Postings from November 2016

[perl #130010] v5.25.5-184-ga5540cf breaks texinfo

Thread Previous | Thread Next
From:
James E Keenan via RT
Date:
November 10, 2016 02:04
Subject:
[perl #130010] v5.25.5-184-ga5540cf breaks texinfo
Message ID:
rt-4.0.24-5212-1478743448-956.130010-15-0@perl.org
On Wed, 09 Nov 2016 20:22:07 GMT, demerphq wrote:
> On 9 November 2016 at 20:17, Hugo van der Sanden via RT
> <perlbug-followup@perl.org> wrote:
> > I was able to reduce it further to a standalone case:
> >
> > % cat lib/Unicode/EastAsianWidth.pm
> > package Unicode::EastAsianWidth;
> > use strict;
> > use base 'Exporter';
> >
> > our @EXPORT = qw(InFullwidth);
> >
> > sub InFullwidth {
> >     return <<END;
> > END
> > }
> >
> > 1;
> > __END__
> > % perl -Ilib -e 'A::xx(); package A { use Unicode::EastAsianWidth;
> > sub xx { split /[^\s\p{InFullwidth}]/, "x" } }'
> > perl: util.c:1880: Perl_croak_no_modify: Assertion `0' failed.
> > Aborted (core dumped)
> > %
> >
> > Note that if the module is C<use>d before the package declaration,
> > the assertion is not hit.
> 
> Oooh. ++ Even further:
> 
> ./perl -Ilib -e 'A::xx(); package A; sub InFullwidth{ return "\n" }
> sub xx { split /[^\s\p{InFullwidth}]/, "x" }'
> SV = INVLIST(0x2391d00) at 0x2387178
>   REFCNT = 1
>   FLAGS = (READONLY,PROTECT)
>   PV = 0x2464530
>   CUR = 0
>   LEN = 9
> perl: util.c:1880: Perl_croak_no_modify: Assertion `0' failed.
> Aborted
> 
> If I replace the \s with its logical equivalent there is no assert:
> 
> ./perl -Ilib -e 'A::xx(); package A { sub InFullwidth{ return "\n" }
> sub xx { split /[^ \t\r\n\p{InFullwidth}]/, "x" } }'
> 
> and if I replace it with \w there is also no assert, but with \s, \h,
> \d there is.
> 
> I have been poking around a bit more, and the place the invlist gets
> its readonly flag turned on is the end of Perl__swash_to_invlist().
> 
> It looks to me like it gets compiled once, then for some reason we try
> to compile it again, and it blows up.
> 
> Yves

khw created a new branch: origin/smoke-me/khw-kid51 and in commit 0d87c6cef3e5e707ffb605eee435b28533f33f60 provided a fix for this problem.

In that same branch I adapted Yves' test above and pushed it in commit 1f3d9c6b7bd9e72652c2a8e8c98f65ea1df01f6e.  (I haven't written too many regex tests in core, so if it's not in the right format, please feel free to adjust.)

Thank you very much.

-- 
James E Keenan (jkeenan@cpan.org)

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

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