Overview
| Artifact ID: | 18868b2f614c07f927dd87a4c792a2c59215f14c |
|---|---|
| Ticket: | 3564735fffffffffffffffffffffffffffffffff
Tcl8.5 + incrTcl3.4 [variable] crash |
| User & Date: | bgriffin on 2012-09-04 15:38:00 |
Changes
- assignee changed to: "msofer"
- cmimetype changed to: "text/plain"
- comment changed to:
I've recently tracked down a crash that was due to faulty coding in an incrTcl methods, however, I don't know if this is a known "problem" with incrTcl, or a bug in the 8.5.8+34 combination, or just the way things are. I'm also wondering if there shouldn't be a runtime check for this condition. So what is the problem? itcl::class Dog { variable bite method bark {} } itcl::body Dog::bark {} { variable bite set bite false puts "Bark!" } The crash is due to the unnecessary "variable" statement in the itcl::body. It ends up corrupting the heap. (Thanks for TCL_MEM_DEBUG!) $ tclsh8.5 % package require Itcl 3.4 % memory validate on % itcl::class Dog { variable bite method bark {} } % itcl::body Dog::bark {} { variable bite set bite false puts "Bark!" } % Dog fido fido % fido bark hi guard byte 0 is 0x62 b total mallocs 114496 total frees 103026 current packets allocated 11470 current bytes allocated 482362 maximum packets allocated 15640 maximum bytes allocated 630832 high guard failed at 81ba7f8, .../tcl/unix/../generic/tclHash.c 344 8 bytes allocated at (.../incrTcl/itcl/generic/itcl_migrate.c 130) Memory validation failure Abort(coredump) - foundin changed to: "obsolete: 8.5.12"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "bgriffin"
- subsystem changed to: "21. [namespace]"
- title changed to: "Tcl8.5 + incrTcl3.4 [variable] crash"
- type changed to: "Bug"