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

Re: "perl: utf8.c:1997: Perl_swash_fetch: Assertion `klen <= sizeof(PL_last_swash_key)' failed." [5.12.1]

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
November 29, 2010 01:35
Subject:
Re: "perl: utf8.c:1997: Perl_swash_fetch: Assertion `klen <= sizeof(PL_last_swash_key)' failed." [5.12.1]
Message ID:
20101129093533.GY24189@plum.flirble.org
On Sun, Nov 28, 2010 at 02:36:22PM -0800, Reverend Chip wrote:
> On 11/28/2010 2:31 PM, Nicholas Clark wrote:
> > On Sun, Nov 28, 2010 at 02:26:51PM -0800, Reverend Chip wrote:
> >> On 11/28/2010 2:34 AM, demerphq wrote:
> >>> However if it means we have to validate the string every time we do a
> >>> utf8 operation then I would say you are wrong.
> >> Slippery slope fallacy.
> > Why so?
> 
> Because "validate" implies a level of caution that I have never
> requested, and never will.  At most I've requested "don't actually
> crash" with a side order of "show me where I need to add protective
> calls to utf8::validate", which would be satisfied by, for example,
> avoiding invalid C pointers caused by bad utf8 and turning any
> invalid-utf8-caused asserts to croaks.  As you well know, avoiding

Yes, which means that you are requesting that we either

a: audit the code for every possibility of this happening

or

b: effectively play whack-a-mole by treating every instance of discovering
   that perl is crashing due to users using functions marked [INTERNAL] to
   produce invalid internal state as a core bug that needs fixing.


which was *precisely* why I was asking "where do we stop?" and your answer
seems to be "we don't".

Nicholas Clark



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