Overview
| Artifact ID: | 5f656870209a553e1c7d567abeb2406255c298b2 |
|---|---|
| Ticket: | 07d13d99b0a94420a5d25091b4baf917839cdce5
Who broke TCL 8.6 and Tclblend ? |
| User & Date: | anonymous on 2016-04-09 22:33:39 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
Tclblend (1.4.1), the popular package providing access to Java classes, no more works with Tcl 8.6.x Tclblend was still working with Tcl 8.6.0; starting with Tcl-8.6.1, Tclblend stopped working. Here is a minimal crash test: package require java 1.4 set jobj [java::new Object] $obj toString ;# CRASH I cannot claim to understand how tclblend internally works, but I believe I've found the way to fix it. The fix is in the tcl-core, more specifically in "generic/tclObj.c" . I propose to *undo* a part of the changes occurred in 8.6.0->8.6.1 . (Check-in [2688d65077] 2013-09-26 13:13:47) Within the function "Tcl_GetCommandFromObj", change from: if (SetCmdNameFromAny(interp, objPtr) != TCL_OK) { return NULL; } to: if (tclCmdNameType.setFromAnyProc(interp, objPtr) != TCL_OK) { return NULL; } Note that "by default" tclCmdNameType.setFromAnyProc == SetCmdNameFromAny ( i.e. the two code fragments are equivalent ). Only some (rare) extensions do redefine tclCmdNameType.setFromAnyProc and therefore it's vital that Tcl_GetCommandFromObj call the redefined function and not the 'standard' SetCmdNameFromAny. In other words, Tclblend redefines the function setFromAnyProc with its own "SetJavaCmdFromAny", but this function is never called, since TCL (8.6.1) always calls the original SetCmdNameFromAny. This causes the crash. I tested this change with a 'patched' Tcl-8.6.1 and Tcl-8.6.4 and I had no more crash, even with heavy applications using tclblend. As I said before, this core-change has no impact for Tcl, since Tcl *never* changes the tclCmdNameType.setFromAnyProc value. - foundin changed to: "8.6.1"
- is_private changed to: "0"
- login: "anonymous"
- priority changed to: "5 Medium"
- private_contact changed to: "af9c70d5700d5af288b87a3a9ed94e1300911d18"
- resolution changed to: "None"
- severity changed to: "Severe"
- status changed to: "Open"
- submitter changed to: "anonymous"
- subsystem changed to: "10. Objects"
- title changed to: "Who broke TCL 8.6 and Tclblend ?"
- type changed to: "Bug"