set a(a) b
parray a
Running normally segfaults:
mdiep$ ./parrot languages/tcl/tcl.pbc languages/tcl/example.tcl
Segmentation fault
Tracing causes a weird tracing error that has to do with '\0' in
string registers:
mdiep$ ./parrot -tf languages/tcl/tcl.pbc
languages/tcl/example.tcl 2>trace.log
invalid command name "array"
Tracing with garbage collection gives the original segfault:
mdiep$ ./parrot -G -tf languages/tcl/tcl.pbc
languages/tcl/example.tcl 2>trace.log
Segmentation fault
The trace reveals that this has to do with the Iterator pmc:
mdiep$ tail trace.log
4873 unless P15, 47 - P15=Iterator=PMC(0xff1538),
4876 set I0, 1 - I0=1,
4879 set I1, 0 - I1=0,
4882 set I2, 0 - I2=0,
4885 set I3, 0 - I3=1,
4888 set I4, 0 - I4=0,
4891 set S1, "O" - ,
4894 set P2, P15 - P2=PMCNULL, P15=Iterator=PMC(0xff1538)
4897 callmethodcc "next"
# find_method class 'Iterator' method 'next': NCI
These GC issues with tracing have been pretty frequent. Please take a
look at languages/tcl/lib/commands/parray.pir to make sure the
iterator code is correct.
Thanks.
--
matt diephouse
http://matt.diephouse.com