Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2011-04-12
09:44 • Ticket [1512138fff] Signal obj deletion vs. shimmering: tests missing status... artifact: f8f5555849 user: msofer
09:44 • Closed ticket [1512138fff]. artifact: 717bf716c4 user: msofer
2009-12-11
10:18 • Ticket [1512138fff]: 1 change artifact: 02bec280a6 user: msofer
2009-05-01
08:20 • Ticket [1512138fff]: 1 change artifact: ca5b4daf89 user: msofer
2008-06-28
23:01 • Ticket [1512138fff]: 6 changes artifact: c3cb392d7d user: msofer
2006-10-02
17:46 • Open ticket [1512138fff]. artifact: ef292bfea6 user: msofer
2006-10-01
02:01 • Closed ticket [1512138fff]. artifact: b36e28daf2 user: msofer
02:01 • Add attachment signalDeletion.patch to ticket [1512138fffffffff|1512138... artifact: 4a98764972 user: msofer
2006-09-30
21:28 • Ticket [1512138fff] Signal obj deletion vs. shimmering status still Open wit... artifact: c005cff326 user: msofer
01:04 • Ticket [1512138fff]: 1 change artifact: 37be8eea6a user: msofer
2006-06-30
15:14 • Ticket [1512138fff]: 5 changes artifact: a06200a89f user: dkf
2006-06-25
21:25 • Ticket [1512138fff]: 4 changes artifact: f83d531fdf user: msofer
21:25 • Add attachment signalDeletion.patch to ticket [1512138fffffffff|1512138... artifact: febb29b375 user: msofer
14:25 • New ticket [1512138fff] Signal obj deletion vs. shimmering. artifact: eaf9f7d1a9 user: msofer

Signal obj deletion vs. shimmering: tests missing

Closed / Accepted1512138fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 16 years ago
Descriptionplain2006-06-25 14:25:45
In a discussion on TCLCORE, jcw requested the
possibility to determine if the obj is being deleted or
shimmered when he receives a cal to its freeIntRepProc
(a link to the discussion will be added here when the
tclcore archives return online).

This patch implements this possibility by insuring that
on deletion the string rep is invalidated first, and
indicating the fact that the string rep is invalid by a
negative length. Note that a NULL string rep cannot be
used to signal this fact, as the bytes field is
currently used to implement the deletion stack.

A negative length will always indicate that the object
is being freed:
   - if the obj is being freed, the stringrep is always
invalidated and the length set to -1 before calling the
freeIntRepProc
   - if the obj is being shimmered, the setFromAnyProc
of the new type will have insured that a string rep is
available before freeing the old intrep.

This looks pretty safe and cheap to me; requesting
review by dkf before commit.
msoferplain2006-06-25 21:25:46
File Added - 182927: signalDeletion.patch
dkfplain2006-06-30 15:14:35
Logged In: YES 
user_id=79902

Patch looks OK modulo one or two comment-formatting points,
but please add a function (exported through tclInt.decls)
for checking whether an object is being deleted. This will
help to ensure that extensions do not encode the information
that length==-1 is magical, and should prevent pain later on.
msofer Ticket [1512138fff]: 1 change [History diff]2006-09-30 01:04:44
msoferplain2006-09-30 21:28:09
Logged In: YES 
user_id=148712

The tclcore thread is at
http://aspn.activestate.com/ASPN/Mail/Message/3168511
msoferplain2006-10-01 02:01:58
File Added - 196009: signalDeletion.patch

Logged In: YES 
user_id=148712

Revised patch committed, provides the new function
  int TclObjBeingDeleted(Tcl_Obj *objPtr)
in the internal stubs table.
msoferplain2006-10-02 17:46:49
Logged In: YES 
user_id=148712

Missing tests in the testsuite!
msoferplain2008-06-28 23:01:05
data_type - 110894

Logged In: YES 
user_id=148712
Originator: YES

Moving to bugs for the missing tests
msofer Ticket [1512138fff]: 1 change [History diff]2009-05-01 08:20:50
msofer Ticket [1512138fff]: 1 change [History diff]2009-12-11 10:18:28
msoferplain2011-04-12 09:44:56
allow_comments - 1
msofer Ticket [1512138fff]: 2 changes [History diff]2011-04-12 09:44:57
Log in (anonymous is fine) to add a comment.

Attachments: