Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2019-05-10
14:03 • Closed ticket [1716730fff]: alleged bug claimed in TraceVar.3 plus 8 other c... artifact: 1cf863b455 user: dgp
2013-04-10
23:28 • Ticket [1716730fff]: 1 change artifact: 98aa2b012a user: dgp
2013-01-08
01:38 • Ticket [1716730fff]: 1 change artifact: bb829da733 user: dgp
2007-05-10
19:22 • New ticket [1716730fff]. artifact: d3f5d51523 user: dgp

alleged bug claimed in TraceVar.3

Closed / Rejected1716730fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 8 years ago
Descriptionplain2007-05-10 19:22:48
Near the end of TraceVar.3, we see:

BUGS
  Tcl doesn’t do any error checking to prevent
  trace procedures from mis-using the interpreter
  during traces with TCL_INTERP_DESTROYED set.

It would be a fairly simple matter for
TclCallVarTraces to pass in a value of
(interp == NULL) in exactly those cases
when it is setting the TCL_INTERP_DESTROYED
flag.  A Tcl_TraceVarProc certainly can't
abuse an interp it never receives a pointer
for.

I suppose there's too many existing
Tcl_TraceVarProcs that implicitly assume
they receive a non-NULL interp argument
to do anything like this before Tcl 9.

Oh well, at least it's recorded.
dgp Ticket [1716730fff]: 1 change [History diff]2013-01-08 01:38:27
dgp Ticket [1716730fff]: 1 change [History diff]2013-04-10 23:28:20
dgpplain2019-05-10 14:03:59
A null interp value is not suitable.

A variable is being traced and without an interp, the
context to find that variable again is incomplete.

Although the TCL_INTERP_DESTROYED signal that interp
destruction has begun is a good warning not to 
Tcl_Eval() anything in it, an interpreter being destroyed
can still do some things, and access to do those things
is useful.

When TIP 543 is accepted, the documentation in question
will go away.
Log in (anonymous is fine) to add a comment.