This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Assertion fails in multi-char regex match
authorKarl Williamson <public@khwilliamson.com>
Fri, 13 May 2011 14:35:23 +0000 (08:35 -0600)
committerKarl Williamson <public@khwilliamson.com>
Wed, 18 May 2011 16:52:39 +0000 (10:52 -0600)
commitf9126265bc03faa150614fa80fcd98e7056fb385
tree299c0f2ef4f52fd749ddb312aeed7fac6e35f42f
parent17163f855fd26aa10245c144199729af4cc7ff81
Assertion fails in multi-char regex match

In '"s\N{U+DF}" =~ /\x{00DF}/i, the LHS folds to 'sss', the RHS to 'ss'.
The bug occurs when the RHS tries to match the first two es's, but that
splits the LHS \xDF character, which Perl doesn't know how to handle,
and the assertion got triggered.  (This is similar to [perl #72998].)

The solution adopted here is to disallow a partial character match,
as #72998 did as well.
regexec.c
t/re/pat_advanced.t