develooper Front page | perl.perl5.porters | Postings from April 2018

[perl #131642] regcomp.c:18417: voidS_skip_to_be_ignored_text(RExC_state_t *, char **, const _Bool): Assertion `!UTF || UTF8_IS_INVARIANT(**p) || UTF8_IS_START(**p)' failed.

Thread Previous
From:
Karl Williamson via RT
Date:
April 2, 2018 00:13
Subject:
[perl #131642] regcomp.c:18417: voidS_skip_to_be_ignored_text(RExC_state_t *, char **, const _Bool): Assertion `!UTF || UTF8_IS_INVARIANT(**p) || UTF8_IS_START(**p)' failed.
Message ID:
rt-4.0.24-30117-1522628032-835.131642-15-0@perl.org
It seems to me that the right fix to this is to forbid pack from returning malformed UTF-8.  When I change it to do that, various tests in our suite fail.  All these look to be deliberate attempts to generate malformed UTF-8, and testing how this is handled, and they use pack to do that generating.

So, it's been known that you can use pack for this, and people have taken advantage of it.  No /cpan tests rely on this.  But I think we've gotten wise over the years about the perils of malformed UTF-8, and I think this is one that should be fixed.

I don't know if it is too late in the 5.28 development cycle to do so, however.  But another way of looking at it, it is just in time to fix bugs that would otherwise occur in 5.28
-- 
Karl Williamson

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

Thread Previous


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