|
2002-06-26
| ||
| 22:26 | • Closed ticket [484200ffff]: TclEvalObjvInternal: potential segfault plus 7 o... artifact: 55f74aba39 user: vincentdarley | |
|
2002-06-22
| ||
| 01:40 | • Ticket [484200ffff]: 5 changes artifact: d62bc45bf3 user: msofer | |
| 00:05 | • Ticket [484200ffff]: 4 changes artifact: cb0748bc5b user: dgp | |
| 00:05 | • Ticket [484200ffff]: 1 change artifact: b081ab958e user: dgp | |
|
2001-11-27
| ||
| 03:57 | • Ticket [484200ffff]: 4 changes artifact: baa902a39b user: dgp | |
|
2001-11-21
| ||
| 15:11 | • New ticket [484200ffff]. artifact: 1cb95e9683 user: dgp | |
TclEvalObjvInternal: potential segfault
Closed / Invalid484200ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 24 years ago
Descriptionplain2001-11-21 15:11:23
Within TclEvalObjvInternal(), trace
procedures are called in a loop like:
for (tracePtr = iPtr->tracePtr;
tracePtr != NULL;
tracePtr = nextPtr) {
nextPtr = tracePtr->nextPtr;
...
(*tracePtr->proc)(tracePtr->clientData, interp,
iPtr->numLevels, commandCopy,
cmdPtr->proc, cmdPtr->clientData,
objc, argv);
}
Trouble with that is (*tracePtr->proc) could
do anything, including calling Tcl_DeleteTrace
on the Tcl_Trace held by nextPtr. If it does
that, there will be a segfault.
The technique used by command and variable traces
that involves defining additional structures
such as ActiveCommandTrace and special handling
could be adapted to solve this problem.
dgpplain2001-11-27 03:57:19
Logged In: YES user_id=80530 The TIP 62 reference implementation (Tcl Patch 562580) appears to address this potential bug, though it's a patch against an earlier HEAD.
dgp Ticket [484200ffff]: 1 change
[History diff]2002-06-22 00:05:08
dgpplain2002-06-22 00:05:09
Logged In: YES user_id=80530 Can we check that TIP 62 really fixed this?
msoferplain2002-06-22 01:40:14
Logged In: YES user_id=148712 It looks like it did; that logic now moved from TEOVI to TclCheck[...]Traces in tclCmdMZ.c, a cursory look (without deep understanding) suggests the issue is handled there. Assigning to Vince so that he (hopefully) confirms that all's well and closes the ticket.
vincentdarleyplain2002-06-26 22:26:19
Logged In: YES user_id=32170 I agree with Miguel. It looks as if there is not a problem. I also recall doing extensive testing of this sort of thing (trace deletes trace, trace deletes cmd, etc), with no adverse effects.
Log in (anonymous is fine) to add a comment.