From: SourceForge.net <no...@so...> - 2012-09-04 17:11:58
|
Bugs item #3564735, was opened at 2012-09-04 08:38 Message generated for change (Comment added) made by dgp You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3564735&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 21. [namespace] Group: current: 8.5.12 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Brian Griffin (bgriffin) Assigned to: miguel sofer (msofer) Summary: Tcl8.5 + incrTcl3.4 [variable] crash Initial Comment: 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) ---------------------------------------------------------------------- >Comment By: Don Porter (dgp) Date: 2012-09-04 10:11 Message: Rolling back Itcl to the same era, http://core.tcl.tk/itcl/info/3f5de3c16d the same problem is present. This is not a recent Itcl regression. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2012-09-04 10:07 Message: The failure has been present since the Tcl checkin http://core.tcl.tk/tcl/ci/c49c117219 which is "modifs to help itcl adapt to VarReform" For many Tcl checkins prior to that, current Itcl source either cannot build or cannot [load]. Appears that this bug is an indication that some details of adjusting to Tcl "VarReform" just never got done right. ---------------------------------------------------------------------- Comment By: Serg G. Brester (sebres) Date: 2012-09-04 09:13 Message: I could not reproduce it with 8.5.11 and itcl-3-branch on windows. How often is it reproducible? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3564735&group_id=10894 |