Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2009-11-24
19:01 • Closed ticket [2903011fff]: Segv from calling destructor within constructor ... artifact: d86eda9d72 user: dkf
17:01 • Add attachment crashlog to ticket [2903011fff] artifact: 7e9201f4c8 user: coldstore
17:01 • Ticket [2903011fff] Segv from calling destructor within constructor status s... artifact: 3acbf74c0d user: coldstore
10:01 • New ticket [2903011fff]. artifact: e4e2ea1fba user: coldstore

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: