Overview
| Artifact ID: | 879a90f3fd3e929d697c91433d16ec981b601109050df4416068dbbed0c55fb4 |
|---|---|
| Ticket: | ec1ee3bc921ff34aaf0391781c2a90eed1fceffa
tcltest crashes when a [testasync] handler is invoked from the event loop (NULL interp) |
| User & Date: | serhiy.storchaka on 2026-10-18 09:39:59 |
Changes
- cmimetype changed to: "text/x-fossil-wiki"
- comment changed to:
The tcltest binary crashes (segmentation fault) when a <nowiki>[testasync]</nowiki> handler is invoked from the event loop: <verbatim> proc cb {result code} {return $code} set h [testasync create cb] testasync marklater $h after 500 {set done 1} vwait done </verbatim> <tt>AsyncHandlerProc()</tt> in generic/tclTest.c calls <tt>Tcl_GetStringResult(interp)</tt> before it checks for <tt>interp == NULL</tt>, which is what <tt>Tcl_AsyncInvoke()</tt> passes when async handlers run from the event loop. Only the test command is affected, not the library. Seen with 8.6.18, 9.0.5 and 9.1.0. Proposed fix in branch [/timeline?r=testasync-null-interp|testasync-null-interp]: without an interpreter the handler just returns the code. Test async-5.1. - foundin changed to: "8.6.18, 9.0.5, 9.1.0"
- login: "serhiy.storchaka"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- subsystem changed to: "04. Async Events"
- title changed to:
tcltest crashes when a [testasync] handler is invoked from the event loop (NULL interp)
- type changed to: "Bug"