Leopold Toetsch wrote:
Will Coleda <[EMAIL PROTECTED]> wrote:
The recent conversion to mostly defaulting to ascii has broken Tcl (*again*).
./parrot languages/tcl/tcl.pbc languages/tcl/examples/hello.tcl
No, I don't think so.
$ ./parrot languages/tcl/tcl.pbc languages/tcl/examples/hello.tcl Hello World
$ ./parrot -G languages/tcl/tcl.pbc languages/tcl/examples/hello.tcl Hello World
$ ./parrot --gc-debug languages/tcl/tcl.pbc languages/tcl/examples/hello.tcl parrot: encodings/fixed_8.c:190: fixed8_set_position: \ Assertion `pos < (iter->str)->obj.u._b._buflen' failed. Aborted
I've already described the problem, but you might have missed it. So here it is again:
In dynclasses/tclparser.pmc:class_init() you are creating strings like C<bs_nl>, which are static globals in this file. These strings are not anchored on the stack nor registered with the Parrot DOD registry. All this strings created here vanish after the first DOD run.
To fix it please try: - create an FixedStringArray with the size of the amount of strings - stuff all the strings into the array - C<dod_register_pmc()> this array
HTH, leo
Two things:
1) Leo's suggestion fixes most of the issues I had with svn-current.
2) Bah! This code worked in my sandbox for quite some time. Adding "--gc-debug" to the tcl test suite to avoid introducing more gc-related bugs in the future.