# New Ticket Created by  Bruce Gray 
# Please include the string:  [perl #19511]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=19511 >


On Win32, these tests are segfaulting due to invalid 
pointers in List_chunk structs:
t/op/string.t      97-98
t/pmc/intlist.t    3-4
t/pmc/pmc.t        80

The problem is caused by list.c/allocate_chunk not 
initializing the pointers. This patch corrects the problem.

-- 
Hope this helps,
Bruce Gray



-- attachment  1 ------------------------------------------------------
url: http://rt.perl.org/rt2/attach/46396/36388/e02d85/list_chunk_initialize.patch

Index: list.c
===================================================================
RCS file: /cvs/public/parrot/list.c,v
retrieving revision 1.23
diff -u -r1.23 list.c
--- list.c      27 Dec 2002 09:33:11 -0000      1.23
+++ list.c      28 Dec 2002 03:37:35 -0000
@@ -187,6 +187,10 @@
     Parrot_block_GC(interpreter);
     chunk = (List_chunk *)new_bufferlike_header(interpreter, sizeof(*chunk));
     chunk->items = items;
+    chunk->n_chunks = 0;
+    chunk->n_items  = 0;
+    chunk->next     = NULL;
+    chunk->prev     = NULL;
     Parrot_allocate_zeroed(interpreter, (Buffer *)chunk, size);
     Parrot_unblock_DOD(interpreter);
     Parrot_unblock_GC(interpreter);

Reply via email to