Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2005-11-19
06:08 • Closed ticket [1355942fff]: crash in nested ns deletions plus 3 other change... artifact: 9c45129b77 user: msofer
2005-11-14
08:35 • Ticket [1355942fff]: 4 changes artifact: 8dd873da02 user: msofer
01:56 • Ticket [1355942fff]: 4 changes artifact: 9fa2caf74b user: msofer
2005-11-13
15:41 • New ticket [1355942fff]. artifact: 1b86e9d86f user: msofer

crash in nested ns deletions

Closed / Fixed1355942fffffffffffffffffffffffffffffffffCreated 21 years agoUpdated 21 years ago
Descriptionplain2005-11-13 15:41:54
mig@ave:/home/CVS/tcl_SF_clean/unix$ cat /tmp/crash
namespace eval ::test_ns_2 {
    proc foo {} {lappend ::result 2}
    trace add command foo delete {namespace eval
::test_ns_3 foo;#}
}
namespace eval ::test_ns_3 {
    proc foo {} {
        namespace delete ::test_ns_2
    }
}
puts [info patch]
namespace delete ::test_ns_2

mig@ave:/home/CVS/tcl_SF_clean/unix$ ./tclsh /tmp/crash
8.5a4
Segmentation fault

NOTE: 8.4.7 is immune, core-8-4-branch and HEAD bomb.
msoferplain2005-11-14 01:56:34
Logged In: YES 
user_id=148712

Simpler crash:

Interestingly, the following does not crash:

namespace eval ::test {
    proc bar {} {}
    trace add command bar delete foo;#
}
proc foo {} {
    namespace delete ::test
}
namespace delete ::test

Another remark: 8.4.7 does not crash here, but it has
different compile flags.
msoferplain2005-11-14 08:35:02
Logged In: YES 
user_id=148712

Fixed in HEAD; backport to core-8-4-branch not yet done.
msofer Closed ticket [1355942fff]. [History diff]2005-11-19 06:08:29
Log in (anonymous is fine) to add a comment.