A probably GC related bug emerged with the new sprintf code.
Putting "sweepoff" in front of the PASM avoids the bug.

Running various tests with the -d flag SIGSEGVs at printing memory 
statistics:

$ time parrot -d t/pmc/intlist_6.pbc
*** Parrot VM: Debugging enabled. ***
*** Parrot VM: Setting up ARGV array in P0.  Current argc: 1 ***
         0: t/pmc/intlist_6.pbc
ok 1
ok 2
Segmentation fault (core dumped)

(gdb) bac
#0  0x400da023 in memcpy () at ../sysdeps/generic/memcpy.c:64
#1  0x8078496 in string_append (interpreter=0x8126640, a=0x813c4d0,
     b=0x813c4f4, Uflags=0) at string.c:146
#2  0x80be1a0 in Parrot_sprintf_format (interpreter=0x8126640, 
pat=0x813c4f4,
     obj=0xbffff45c) at spf_render.c:631
#3  0x80bcc12 in Parrot_vsprintf_s (interpreter=0x8126640, pat=0x813c4f4,
     args=0xbffff504) at misc.c:40
#4  0x80bcc7a in Parrot_vsprintf_c (interpreter=0x8126640,
     pat=0x80e5780 "*** Parrot VM: Dumping GC info ***\n\tTotal memory 
allocated: %p\n\tTotal DOD runs:         %p\n\tTotal collector runs: 
%p\n\tActive PMCs:", ' ' <repeats 12 times>, "%p\n\tActive buffers: 
     %p\n\tTotal PMCs:", ' ' <repeats 13 times>..., args=0xbffff4ec) at 
misc.c:50
#5  0x80bf9d7 in PIO_eprintf (interpreter=0x8126640,
     s=0x80e5780 "*** Parrot VM: Dumping GC info ***\n\tTotal memory 
allocated: %p\n\tTotal DOD runs:         %p\n\tTotal collector runs: 
%p\n\tActive PMCs:", ' ' <repeats 12 times>, "%p\n\tActive buffers: 
     %p\n\tTotal PMCs:", ' ' <repeats 13 times>...) at io/io.c:664
#6  0x808ed12 in Parrot_runcode (interpreter=0x8126640, argc=1,
     argv=0xbffff5ec) at embed.c:357
#7  0x80d5f6b in main (argc=1, argv=0xbffff5ec) at test_main.c:50 


I couldn't trace it down til now - but probably some string is moving 
around, whille a pointer is kept into it.

leo

Reply via email to