Artifacts Associated With Ticket 3366265
Ticket change [d1f4e33e66] (rid 113444) by dgp on 2011-07-13 17:41:36:
- assignee initialized to: "dgp"
- cmimetype initialized to: "text/plain"
- comment initialized to:
New test in a --enable-symbols=all build : test proc-3.7 {TclObjInterpProc, wrong num args} { proc {} {x} {} list [catch {{}} msg] $msg } {1 {wrong # args: should be "{} x"}} produces this memory validation failure: Test file error: hi guard byte 0 is 0x0 total mallocs 35586 total frees 29673 current packets allocated 5913 current bytes allocated 510073 maximum packets allocated 6380 maximum bytes allocated 576498 high guard failed at 164b5498, /home/dgp/fossil/tcl8.4/unix/../generic/tclProc.c 1161 2 bytes allocated at (/home/dgp/fossil/tcl8.4/unix/../generic/tclProc.c 1158) Memory validation failure Thanks to "jboning" on the chat for reporting. - foundin initialized to: "obsolete: 8.4.19"
- is_private initialized to: "0"
- priority initialized to: "9 Immediate"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "22. [proc] and [uplevel]"
- title initialized to: "buffer overflow due to TclObjInterpProc flaw"
- type initialized to: "Bug"
Ticket change [b83fdabd8c] (rid 128937) by dgp on 2011-07-14 00:44:57:
- icomment:
Problem is that line 1158 of tclProc.c allocates a buffer of only 2 bytes to hold the formatted value of the command name "{}", forgetting that Tcl_ConvertCountedElement() needs one additional byte in which to write the terminating NUL. - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [7288e3e987] (rid 100877) by dgp on 2011-07-14 00:54:31:
- icomment:
Fix committed for 8.4.20.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [d3d0b87019] (rid 123350) by dgp on 2011-07-14 09:43:29:
- icomment:
On the 8.5 branch, the bug's moved over to Tcl_WrongNumArgs(). It's also been defanged because the TclStackAlloc() allocator is now used, and that allocator doesn't have a memory debugger to trip, and in the failing case of an empty proc name, the TclStackAlloc() practice of allocating by pointer-sized words automatically provides enough extra overhead space to not permit a failure. Nevertheless, imagining some future maintenance programmer converting from TclStackAlloc() back to ckalloc(), it's best to get the requested size correct.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [b868330926] (rid 128963) by dgp on 2011-07-14 10:20:09:
- closedate changed to: "2011-07-14T03:20:09"
- closer changed to: "dgp"
- icomment:
allow_comments - 1 fix merged to trunk as well.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dgp"