This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
split ' ', $foo: don't check end byte
authorDavid Mitchell <davem@iabyn.com>
Mon, 26 Dec 2016 12:49:24 +0000 (12:49 +0000)
committerDavid Mitchell <davem@iabyn.com>
Mon, 26 Dec 2016 12:49:24 +0000 (12:49 +0000)
commitd720149d59afad1fa0ae15d5f092fdc47bd1a4f7
tree0ed8e2693265e5871d4672ae5a4412ee3f82b32f
parent6b776407d46448d59a69054c8cd4cec4d91f50c0
split ' ', $foo: don't check end byte

The special-cased code to skip spaces at the start of the string
didn't check that s < strend, so relied on the string being \0-terminated
to work correctly. The introduction of the isSPACE_utf8_safe() macro
showed up this dodgy assumption by causing assert failures in regen.t
under LC_ALL=en_US.UTF-8 PERL_UNICODE="".
pp.c
t/op/split.t