Steve Fink wrote:
> This is a patch to the hashtable test suite, but the bug looks like it
> might be in string.c:

> a is coming in marked as UTF-32, which seems incorrect (I can view
> a->bufstart as a plain char*, and it has more than one letter in it.)
> b comes in as usascii, which is correct. b gets transcoded to UTF-32.
> Then when string_make() is called, b's bufstart seems to get wiped
> out.

>             /* transcode first so we know the length and avoid infanticide
*/
>             if (a->type != b->type || a->encoding != b->encoding) {
>                 b = string_transcode(interpreter, b, a->encoding, a->type,
>                                      NULL);
>             }
>             result = string_make(interpreter, NULL, a->bufused +
b->bufused,
>                                  a->encoding, 0, a->type);

The first problem sounds similar to one I noticed a while back, where
constants were not getting the right type; but then they were appearing as
Unicode/singlebyte, so something must have changed since - I haven't looked
at it recently.

The second problem is a known infant mortality problem; a previous patch
fixed one cause of it (which is why the comment is there), but another
problems remains - see
http://www.mail-archive.com/perl6-internals@perl.org/msg09311.html for a
post on this subject, which never elicited any response.

--
Peter Gibbs
EmKel Systems


Reply via email to