garbage strings in trace execution
In order to repro: launch tclsh, [set tcl_traceExec 3], enter (empty command) => watch the output, some of the strings reported are obviously garbage
9533dbc4c7[971cb4f1db]: Make debugging traces less inclined to serious visual corruption check-in2014-02-04 08:15:52
assigning to dkf, hoping he sees immediately what's wrong
It's the trim-set, which contains non-ASCII characters and which it seems that printf() doesn't do a good job of displaying. Not sure what to do about it, but it's really rather harmless.
Such "garbage" as is there now is from TclPrintObject() rather than being injected by problems directly in printf(). I've only improved things in the tracing for the INST_STR_TRIM group of instructions because they're the only places where it is very likely to be a problem; elsewhere, problem characters are mostly rare.
I don't know if TclPrintObject() is doing the right thing, but it's what we use in other tricky cases (INST_PUSH for example).
Any further fix belongs in PrintSourceToObj() in generic/tclCompile.c, which everything else is focussed through.
(Self note: this function moves to tclDisassemble.c on the dkf-improved-disassembler branch)
Adjusted that function to be much less broken. (It assumed ASCII!) The result is that the reported case now produces code that can be much more easily understood.