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 26, 2010 01:23
Subject:
Re: "perl: utf8.c:1997: Perl_swash_fetch: Assertion `klen <= sizeof(PL_last_swash_key)' failed." [5.12.1]
Message ID:
20101126092340.GK24189@plum.flirble.org
On Thu, Nov 25, 2010 at 07:47:39PM -0800, Chip Salzenberg wrote:
> I've uncovered the string that's causing this problem.  When the
> attached string has the utf8 bit enabled and a regex is applied, Perl
> dies with the above exception.  Fortunately, utf8::valid() returns
> false, so I have an easy way of avoiding this particular crash.  But
> it's still a Perl bug that should be fixed - assertion failures should
> not result from applying a regex, even to an invalid utf8 string.

It's not clear that *that* is the perl bug.
At what point is perl allowed to start trusting its internal data structures?

Isn't the bug that perl let someone create an invalid data structure?

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