If a regular expression is parsed into more than 32k colors, you get a crash. I initially spotted this in PostgreSQL (http://www.postgresql.org/message-id/515C46A0.firstname.lastname@example.org), but TCL shares the same code and thus has the same bug.
Attached is a TCL test script to reproduce this.
Here's a link to the PostgreSQL commit that fixed this: http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=bf2b0a147857f63daa2e5c17eed0169861371af8. It should apply to TCL sources with minimal changes.