|
2004-07-30
| ||
| 22:16 | • Closed ticket [999084ffff]: re-entrant Tcl_Finalize() plus 8 other changes artifact: 6472074c5d user: dgp | |
|
2004-07-29
| ||
| 20:04 | • Ticket [999084ffff]: 4 changes artifact: 52e546288c user: vasiljevic | |
|
2004-07-28
| ||
| 21:25 | • Ticket [999084ffff]: 5 changes artifact: e29b34795d user: dgp | |
| 07:05 | • Add attachment finalize.patch to ticket [999084ffff] artifact: 332e2f4cef user: dgp | |
| 07:05 | • Ticket [999084ffff] re-entrant Tcl_Finalize() status still Open with 4 other... artifact: de1bcb4308 user: dgp | |
| 00:05 | • New ticket [999084ffff]. artifact: a1bd3d0aac user: dgp | |
re-entrant Tcl_Finalize()
Closed / Accepted999084ffffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2004-07-28 00:05:09
This patch moves the ExitHandler calls of Tcl_Finalize() outside of the TclpInitLock-ed region. This will avoid deadlocks like the one seen in Tk Bug 714956, when the execution of a registered ExitHandler causes another, nested, call to Tcl_Finalize(). This patch should be safe, because the exitHandler loop is careful to always pull the next handler to run from the beginning of the loop, and discard each as it is run, terminating only when the list is empty. The rest of Tcl_Finalize(), protected by a TclpInitLock region, should, we hope, be prevented from making a nested call back into Tcl_Finalize(). Please review.
dgpplain2004-07-28 07:05:09
File Added - 95491: finalize.patch
dgpplain2004-07-28 21:25:42
Logged In: YES user_id=80530 passing on to someone I think knows Tcl_Finalize() better. This patch fixes a bug, but does it cause any new trouble?
vasiljevicplain2004-07-29 20:04:22
Logged In: YES user_id=95086 I see no obvious problems. A side-effect, though, is that, when Tcl_Finalize is called simultaneously by two threads, both of them will execute exit callbacks. Each exit callback will be run once, but you never know in which thread this may happen. Strictly speaking, this should pose no problems, provided that exit callbacks are really app-wide and do not assume any thread local storage ownerships and such. Actually, they should be designed as such in the first place.
dgpplain2004-07-30 22:16:28
Logged In: YES user_id=80530 Thanks! Applying for 8.4.8 and 8.5.
Log in (anonymous is fine) to add a comment.
Attachments:
- finalize.patch [download] added by dgp on 2004-07-28 07:05:09. [details]