Bug found in Tcl 8.4a4, but also in 8.3.
Reproductible script:
proc bug {} {
puts $array([expr {a+2}])
}
In generic/tclCompile.c, function TclCompileTokens(),
line 1242:
sprintf(buffer,
"\n (parsing index for array \"%.*s\")",
((nameBytes > 100)? 100 : nameBytes), name);
but buffer is large enough to contains TCL_UTF_MAX :(.
Logged In: YES
user_id=148712
Donal fixed it in 8.4; I just patched core-8-3-1-branch.