Overview
| Artifact ID: | d345fab3517da7d49c70a7b005cc5044896fcdb5 |
|---|---|
| Ticket: | 873294ffffffffffffffffffffffffffffffffff
script crashes Tcl 8.4.X on Solaris (verified by J. Hobbs) |
| User & Date: | kennykb on 2004-01-10 01:35:06 |
Changes
- icomment:
Logged In: YES user_id=99768 Simpler example: binary scan \000\001\000 a a b; puts $b The first byte is scanned into 'a' - and stored in the scan cache. The reference in the scan cache isn't counted in the ref count. The second byte is stored into 'a' as well, decrementing the refcount of the first obj and freeing it. The third byte pulls the first obj (now a free object) back from the scan cache and stores it in b. Now the free obj list is corrupt. The fix is to do refcounting around Tcl_SetHashValue - and then decrement all the ref counts prior to each of the calls to Tcl_DeleteHashTable (replace them all with a call to a static fn that does it, I guess). A temporary work-around would be to make sure that no variable name is repeated in [binary scan]. Using the @ format group might be helpful.
- login: "kennykb"
- mimetype: "text/plain"
- priority changed to: "8"
- username: "kennykb"