On Tuesday 15 May 2007 12:31:08 chromatic wrote:

> From pmichaud:
>
> [EMAIL PROTECTED]:~/parrot/trunk> prove -v t/op/sprintf.t
> t/op/sprintf....1..308
> parrot: src/string.c:727: string_str_index: Assertion `s->encoding &&
> s->charset && !(((s)->obj.flags) & b_PObj_on_free_list_FLAG)' failed.
> dubious
>         Test returned status 0 (wstat 6, 0x6)

The attached patch works around the problem on 32-bit and 64-bit x86 Linux.  
How are other platforms?

-- c

--- src/string.c	(revision 3496)
+++ src/string.c	(local)
@@ -724,9 +724,7 @@
     if (!string_length(interp, s2))
         return -1;
 
-    saneify_string(s);
-    saneify_string(s2);
-    src = (STRING *)const_cast(s);
+    src    = (STRING *)const_cast(s);
     search = (STRING *)const_cast(s2);
 
     return CHARSET_INDEX(interp, src, search, start);

Reply via email to