Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Segv from calling destructor within constructor

Closed / Fixed2903011fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 17 years ago
Descriptionplain2009-11-24 10:01:08
[oo::class create foo {constructor {} {my destroy}}] new

Sometimes results in a segv in Tcl_GetCommandFullName (interp=0x8053f58, command=0x10b15a98,\
 objPtr=0x1254a650) [example from gdb] called from CallCommandTraces (iPtr=0x8053f58, cmdPtr=0x10b15a98, oldName\
=0x0, newName=0x0, flags=16512) [op cit]

The proximate cause is a bogus cmdPtr->nsPtr which is full of random.

Edited gdb session attached.

Colin.
coldstoreplain2009-11-24 17:01:08
File Added - 352309: crashlog
dkfplain2009-11-24 19:01:08
allow_comments - 1

Nasty. It's not safe to delete an object twice or access most of its fields after the lock in it is dropped.
Log in (anonymous is fine) to add a comment.

Attachments: