|
2022-03-04
| ||
| 16:16 | • Closed ticket [8d8bb39962]: incorrect notifier initialization in tclXtNotify.c</... artifact: 4faed22e79 user: jan.nijtmans | |
| 16:15 | Fix [8d8bb39962]: incorrect notifier initialization in tclXtNotify.c check-in: 362f6d184c user: jan.nijtmans tags: core-8-6-branch | |
|
2022-03-02
| ||
| 12:43 | • Ticket [8d8bb39962] incorrect notifier initialization in tclXtNotify.c statu... artifact: a841c8b834 user: anonymous | |
| 08:13 | • New ticket [8d8bb39962]. artifact: 6810b04255 user: anonymous | |
incorrect notifier initialization in tclXtNotify.c
Closed / Fixed8d8bb39962188ebc27f9276a43a6f6bc5269311eCreated 5 years agoUpdated 5 years ago
Descriptionplain2022-03-02 08:13:17
I need to replace the Tcl notifier, so I had a look at unix/tclXtNotify.c. After "make xttest" and running xttest on a small test script, I noticed the program doesn't end. gdb tells me the program is stuck in Tcl_FinalizeNotifier. I see in unix/tclUnixNotfy.c that Tcl_FinalizeNotifier checks whether tclNotifierHooks.finalizeNotifierProc is set. If so, run that function. Otherwise, run provided cleanup code. Now tclXtNotify.c sets all 8 members of the struct Tcl_NotifierProcs with Tcl_SetNotifier in function InitNotifier(), 4 with custom replacements, and 4 with default Tcl functions, including Tcl_FinalizeNotifier for the finalizeNotifierProc member. On exit, tclNotifierHooks.finalizeNotifierProc is called, so Tcl_FinalizeNotifier is called, and enters an infinite loop. The documentation at http://tmml.sourceforge.net/doc/tcl/Notifier.html seems to imply that all members of the struct Tcl_NotifierProcs need to be replaced with Tcl_SetNotifier. Is this a wrong assumption?
Referenced by1
362f6d184cFix [8d8bb39962]: incorrect notifier initialization in tclXtNotify.c check-in2022-03-04 16:15:04
anonymousplain2022-03-02 12:43:26
interestingly, found very similar code based on the Xt notifier in tclplugin-3.0.0.1/unix/npxtnotify.c from the Tcl/Tk Browser Plugin (see http://www.tcl.tk/software/plugin/ and http://tclplugin.sourceforge.net/). With one difference: here, the struct passed to Tcl_SetNotify has only 4 of the 8 fields set.
jan.nijtmanswiki2022-03-04 16:16:55
Indeed! Thanks for the report.
Also the memset() function was called much too late .....
Fixed now [here]
Log in (anonymous is fine) to add a comment.