Tcl Source Code

View Ticket
Login
Ticket UUID: 958222
Title: TIP 181 (namespace unknown) implementation
Type: Patch Version: TIP Implementation
Submitter: tallniel Created on: 2004-05-21 20:09:12
Subsystem: 21. [namespace] Assigned To: dgp
Priority: 7 High Severity:
Status: Closed Last Modified: 2006-02-23 00:43:13
Resolution: Accepted Closed By: dgp
    Closed on: 2006-02-22 17:43:13
Description:
Reference implementation of TIP 181 [namespace unknown], 
including test suite (needs work) and documentation. Passes test 
suite on Mac OS X.
User Comments: dgp added on 2006-02-23 00:43:13:
Logged In: YES 
user_id=80530

fixes committed.

dgp added on 2006-02-23 00:39:53:

File Deleted - 168278: 



File Added - 168461: 958222-supp.patch

dgp added on 2006-02-23 00:39:52:
Logged In: YES 
user_id=80530


The issues with execution traces
properly dealing with the
TCL_EVAL_* flag values are much
more difficult to address, and
they're really orthogonal to
the new [namespace unknown]
command.

Revised patch is limited to
fixing [namespace unknown] bugs.
A separate bug report will be
filed for the trace issues.

dgp added on 2006-02-22 02:03:17:

File Deleted - 166937: 



File Added - 168278: 958222-supp.patch

dgp added on 2006-02-22 02:03:16:
Logged In: YES 
user_id=80530


Updated patch includes more
[namespace unknown] tests
that illustrate the bugs fixed
by the supplemental patch.

please review.

still needs trace tests.

dgp added on 2006-02-11 02:34:44:

File Added - 166937: 958222-supp.patch

dgp added on 2006-02-11 02:34:43:
Logged In: YES 
user_id=80530

Attaching supplemental patch
addressing these issues.

I won't commit this until I
construct tests for the test
suite that demo its effects.

tallniel added on 2006-02-11 00:13:39:
Logged In: YES 
user_id=102050

I wasn't sure about bumping the refcounts of the other
elements of the unknownHandler. The safest thing to do would
be to put the increments in. 

Regarding TCL_EVAL_DIRECT/GLOBAL, I'm not sure what is the
correct behaviour with these flags. The current code was a
best guess based on what was already there. Certainly, it
could stand some reviewing.

You are correct that the unknown handler cannot possibly be
anything other than a valid list (or NULL). The check can be
changed to a panic, or removed entirely.

dgp added on 2006-02-10 23:43:16:
Logged In: YES 
user_id=80530


When the elements of the 
unknownHandlerPtr are retrieved
within TclEvalObjvInternal, there's
a check for valid list, and return
of TCL_ERROR if not.

This should not be possible.  Valid
list checks are done during storage
of the handler value.  I think it
would be better either to not check
for the error condition, or to check
and react to it with a Tcl_Panic.

As is, I think the error message
and ::errorInfo would not be helpful
at all.

dgp added on 2006-02-10 05:31:58:
Logged In: YES 
user_id=80530


while merging with dgp-refactor
branch, the question arose whether
this patch is properly handling
the TCL_EVAL_INVOKE and/or
TCL_EVAL_GLOBAL cases.  Needs a
careful check, and possibly new
tests.

dgp added on 2006-02-10 05:06:25:
Logged In: YES 
user_id=80530


In the routine TclEvalObjvInternal,
the Tcl_Obj's newObjv[1] through
newObjv[handlerObj-1] do not have
their refcounts bumped before the
recursive call to TEOI.  Looks unsafe
to me.

dgp added on 2006-02-02 01:28:43:
Logged In: YES 
user_id=80530

958222.patch committed for 8.5a4

dgp added on 2006-02-02 01:00:18:

File Added - 165817: 958222.patch

dgp added on 2006-02-02 01:00:14:
Logged In: YES 
user_id=80530

Updated patch to HEAD.

tallniel added on 2006-01-19 04:46:22:

File Added - 163946: tip181-6.patch

Logged In: YES 
user_id=102050

Fixed bug in the patch where Tcl_NamespaceDelete was
decrementing the reference count on the unknownHandlerPtr of
the namespace but not then setting it to NULL. This resulted
in a later double free and possible segmentation fault under
certain conditions, such as those produced by
autoMkindex.test. Added a new test for this condition.
Thanks to Donald Porter for pointing out problem.
tip181-6.patch is the latest.

tallniel added on 2006-01-19 00:00:14:

File Added - 163910: tip181-5.patch

tallniel added on 2006-01-19 00:00:13:
Logged In: YES 
user_id=102050

Updated patch to latest CVS HEAD -- tip181-5.patch is now
the current version.

tallniel added on 2006-01-18 23:44:44:

File Deleted - 163907:

tallniel added on 2006-01-18 23:33:01:

File Added - 163907: tip181-5.patch

tallniel added on 2005-06-14 06:22:14:
Logged In: YES 
user_id=102050

Latest patch tip181-4.patch will hopefully be the last -- now includes 
documentation and C-API (+stubs etc). Passes test-suite.

tallniel added on 2005-06-14 05:08:22:

File Added - 138251: tip181-4.patch

tallniel added on 2004-07-03 07:19:16:

File Added - 92714: tip181-3.patch

nobody added on 2004-05-22 03:59:12:

File Added - 87974: tip181-2.patch

tallniel added on 2004-05-22 03:09:12:

File Added - 87965: tip181.patch

Attachments: