|
2012-08-07
| ||
| 22:28 | • Closed ticket [3554250fff]: exit->close2proc->Tcl_FSDeleteFile == segfau... artifact: 5c6f752762 user: dgp | |
| 22:20 | • Ticket [3554250fff]: 4 changes artifact: 2bccf99002 user: dgp | |
| 22:17 | • Ticket [3554250fff]: 4 changes artifact: a9935aeaa7 user: stwo | |
| 21:04 | • Ticket [3554250fff]: 4 changes artifact: c47aa3507d user: dgp | |
| 20:54 | • Ticket [3554250fff]: 4 changes artifact: 46de9b27b9 user: dgp | |
|
2012-08-05
| ||
| 21:55 | • Ticket [3554250fff]: 4 changes artifact: f50dc2f10c user: ferrieux | |
| 21:42 | • Ticket [3554250fff]: 4 changes artifact: 6b9ec54841 user: ferrieux | |
| 21:30 | • Ticket [3554250fff]: 4 changes artifact: ded7fcb59c user: ferrieux | |
| 21:29 | • Ticket [3554250fff]: 4 changes artifact: 13fc0918da user: ferrieux | |
| 21:02 | • Ticket [3554250fff]: 5 changes artifact: 75f2aba6c7 user: dkf | |
| 02:27 | • Ticket [3554250fff]: 4 changes artifact: a56acb64d0 user: stwo | |
| 02:27 | • Ticket [3554250fff]: 4 changes artifact: 3336b756e9 user: stwo | |
| 02:27 | • Add attachment c.c to ticket [3554250fff] artifact: 6b3375f745 user: stwo | |
|
2012-08-04
| ||
| 12:17 | • New ticket [3554250fff] exit->close2proc->Tcl_FSDeleteFile == segfault</... artifact: b72bdeafe9 user: stwo | |
[exit]->close2proc->Tcl_FSDeleteFile == segfault
Closed / Fixed3554250fffffffffffffffffffffffffffffffffCreated 14 years agoUpdated 14 years ago
Descriptionplain2012-08-04 12:17:45
Tcl_FSDeleteFile will segfault if called from a channel's close2proc when the interpreter [exit]s but not when the main window is destroyed when running wish. This used to work; something changed between 8.5.11 and 8.5.12.
stwoplain2012-08-05 02:27:22
File Added - 450553: c.c
stwoplain2012-08-05 02:27:53
Attached a program that demonstrates the problem.
dkfplain2012-08-05 21:02:49
It would be nice to reproduce without C code. (Don't know if that's possible, or if running inside an exit handler is critical.)
ferrieuxplain2012-08-05 21:29:29
Also, the code mentions failing in 8.6 but I cannot reproduce, even with TCL_FINALIZE_ON_EXIT. Any details on the configure flags ?
ferrieuxplain2012-08-05 21:30:41
Hum, strike that, had not uncommented the proper line :}
ferrieuxplain2012-08-05 21:42:58
Okay, this (in current 8.6 at least) is the result of the finalization sequence nuking the FS part before the IO part: FsThrExitProc called before FinalizeIOSubsystem, which calls the tested close2proc. One has to choose an order, this one is not worse than another (or is it ?). I guess we could make better use of finalization flags to detect this kind of after-death use of an API though. More diggin needed to figure out why it worked in 8.5.11.
ferrieuxplain2012-08-05 21:55:02
To elaborate: the FS finalization part is registered as an (early) exit handler, and as such is run before IO finalization (the idea being that tyipcal exit handlers might do some IO). In some cases (like flushing a zipped rw filesystem) it is good to do things in this order, so let's not change it. Hence I guess the proper fix is along the lines sketched before (robustize flagging).
dgpplain2012-08-07 20:54:25
First broken in http://core.tcl.tk/tcl/info/575001f433 so I'm to blame.
dgpplain2012-08-07 21:04:26
Digging further into the feature branch, the failure appears in http://core.tcl.tk/tcl/info/223bd04c8b
stwoplain2012-08-07 22:17:43
I've switched to using unlink(2) so this is no longer affecting me. If it's not a bug, as ferrieux says, then I guess close this ticket and unburden dgp a tad. :) I realize this is a difficult area of the code to be working in.
dgpplain2012-08-07 22:20:54
Got a fix.
dgpplain2012-08-07 22:28:23
allow_comments - 1 Fix committed to 8.5 and trunk branches.
Log in (anonymous is fine) to add a comment.
Attachments:
- c.c [download] added by stwo on 2012-08-05 02:27:22. [details]