Overview
| Artifact ID: | 2a0aabfe8ab0e451405d6714470027c1178cd183 |
|---|---|
| Ticket: | 1030548fffffffffffffffffffffffffffffffff
Tcl 8.4 fails to build in debug/threaded config |
| User & Date: | dossy on 2004-12-05 08:06:33 |
Changes
- icomment:
Logged In: YES user_id=21885 I agree with you, Jeff, since the special AOLserver builds actually use sed scripts to change Tcl after Tcl's "configure" script has been run. The error in the AOLserver build that I get now when in the --enable-symbols=mem Tcl configuration is: nsthreadtest.o: In function `DumperThread': /cm/build/public/aolserver_v40_r9_test/aolserver/aolserver/nsthread/nsthreadtes t.c:336: undefined reference to `Tcl_GetMemoryInfo' The addition of "!defined(TCL_MEM_DEBUG)" to the top of generic/tclThreadAlloc.c in the fix to bug 1030548 means that Tcl_GetMemoryInfo() which is defined in the file won't get compiled. Since it seems that defining TCL_THREADS and USE_THREAD_ALLOC is mutually exclusive to TCL_MEM_DEBUG, then perhaps the fix to this bug is correct, and AOLserver needs to be modified. However, the change introduced by this fix does break backward compatibility at least for one application (grin) -- perhaps a Tcl_GetMemoryInfo() can be defined in the "#else" section at the end of generic/tclThreadAlloc.c the same way TclFinalizeThreadAlloc() was done? The reason why I think this is wrong is really because I think the notion of TCL_MEM_DEBUG being mutually exclusive to TCL_THREADS/USE_THREAD_ALLOC is a mistake or misunderstanding when it was integrated into the Tcl core. TCL_MEM_DEBUG was really meant to select behavior for Tcl_Alloc/Tcl_Free and friends, in generic/tclCkalloc.c if TCL_MEM_DEBUG is on, they use the debug allocator Tcl_DbCkalloc which wraps TclpAlloc else Tcl_Alloc uses TclpAlloc unwrapped and Tcl_Free uses TclpFree unwrapped, etc. USE_THREAD_ALLOC is the selector for the "zippy" allocator (generic/tclThreadAlloc.c) vs. using the normal Tcl allocator (generic/tclAlloc.c) allocator, implementing their own versions of TclpAlloc and TclpFree, etc. So, TCL_MEM_DEBUG is a wrapping around the Tclp{Alloc,Free} that's provided by EITHER tclThreadAlloc.c OR tclAlloc.c. It's not INSTEAD of. Does this help make things clear why I think the configurations that we are building at AOL are legitimate configurations that, correctly, Tcl cannot validly produce (but were SUPPOSED to!)? -- Dossy - login: "dossy"
- mimetype: "text/plain"
- username: "dossy"