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

[perl #133365] perl 5.28.0 core: Negative array index read in utf8.cand regexec.c

Thread Previous | Thread Next
From:
Marc-Philip via RT
Date:
July 13, 2018 06:15
Subject:
[perl #133365] perl 5.28.0 core: Negative array index read in utf8.cand regexec.c
Message ID:
rt-4.0.24-4421-1531462526-825.133365-14-0@perl.org
On Thu, 12 Jul 2018 13:05:46 -0700, public@khwilliamson.com wrote:
> 
> The reason it isn't checked is because it can't happen.  I suppose we
> could panic.  If it were to return negative it would mean the hardware
> or the memory or something was so corrupt that soldiering on wouldn't
> make sense.

Hi Karl,
thank you for explaining. But then, I still wonder. This Perl__invlist_search in regcomp.c, that we're talking about: It has two places where it can return -1 in blead today. If this can't happen, why is this error handling code there? You've added the function back in 2011 with commit d5e82ecc146, and this "first version" of it also could return -1.

T&R
Marc-Philip

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