OriginalBugID: 1372 Bug
OS: Windows NT
Christopher M. Love
I have compiled Tcl/Tk with -DUSE_TCLALLOC=0, and Tcl and Tk still use
these functions anyway in tclIOUtil.c and tkGrid.c. While running my
application which uses the Grid layout, Purify 6.0 for NT showed there
was a place in Tcl_Free where memory was being read beyond an area of
allocated memory. While I didn't experience an exception, there are times
when a this type of activity does cause an exception. Here's what I'm
1. Can you fix the ABR errors?
2. I replaced the calls in these files to Tcl_Free() and Tcl_Alloc()
with ckalloc() and ckfree(). When compiled with USE_TCLALLOC=0,
the errors disappear. Shouldn't the source you distribute do
this as well. If not, is there some reason for using Tcl_Free()
and Tcl_Alloc() that I'm not aware of?
I found ABR (Array Bounds Reads where the program reads past allocated memory)
in Purify for NT. The source was compiled with Visual C++ 6.0 on NT 4.0
I would expect Purify not to show these errors as they can cause exceptions.
I would also expect that all Tcl/Tk source files adhear to using ckfree() and
ckalloc(), and not call Tcl_Free and Tcl_Alloc directly.
Fixed as per suggestions.
-- 10/30/1999 hobbs