Artifacts Associated With Ticket cea0344a51072386
Ticket change [e814c8c11b] (rid 147815) by dkf on 2016-07-10 07:32:38:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized to:
I was working on sorting out [3606121], and hit a critical bug (while looking at test <tt>namespace-17.5</tt>; I will apply a workaround for that as the failing path isn't supposed to be taken in that test either). The following code will crash: <verbatim> namespace eval ::test_ns_1 { catch {namespace delete test_ns_2} namespace eval test_ns_3 { variable ::test_ns_1::test_ns_2::x 2222 } } </verbatim> When debugging, it looks like the crash is due to the number of arguments being recorded wrongly in the stack frame; the actual crash comes out of <tt>TclLogCommandInfo</tt>, but is because the frame's <tt>argv</tt> has four valid elements in it, but <tt>argc</tt> is 5. It looks like <tt>TclFetchEnsembleRoot</tt> (called from <tt>NRNamespaceEvalCmd</tt>) is doing something wrong, which means there's a problem, and that code isn't something I've worked with. - is_private initialized to: "0"
- login: "dkf"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Critical"
- status initialized to: "Open"
- submitter initialized to: "dkf"
- subsystem initialized to: "21. [namespace]"
- type initialized to: "Bug"
Ticket change [f951dd1c8d] (rid 147816) by dkf on 2016-07-10 07:33:11:
- assignee changed to: "dgp"
- login: "dkf"
- mimetype: "text/plain"
- priority changed to: "9 Immediate"
- title changed to: "Crash from ensemble handling"
Ticket change [67514686fc] (rid 147834) by dgp on 2016-07-10 14:35:11:
- icomment:
On the core-8-6-branch tip [b6a05c2ceb] with --disable-shared --enable-symbols=all I get % namespace eval ::test_ns_1 { catch {namespace delete test_ns_2} namespace eval test_ns_3 { variable ::test_ns_1::test_ns_2::x 2222 } } can't define "::test_ns_1::test_ns_2::x": parent namespace doesn't exist Not a crash, just an error. Any other details? - login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Works For Me"
- icomment:
Ticket change [44a13d0bee] (rid 147850) by dkf on 2016-07-10 22:45:01:
- icomment:
Hmm, the crash occurred for me when I was running just that test on its own, but it seems sensitive to what context it is called from. This crashed for me in a plain interactive shell: <verbatim> $ make shell […] % namespace eval foo { namespace eval bar { namespace delete foo } } Trying to incr ref count of Tcl_Obj allocated in another thread make: *** [shell] Abort trap: 6 </verbatim> And yes, I've also seen the wrong error messages popping up. I've no idea what's wrong, but we definitely can't release 8.6.6 in this state, where error messages inside <tt>namespace eval</tt> cause weird things to happen. - login: "dkf"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [4e17e3452e] (rid 147869) by dgp on 2016-07-11 15:54:19:
- icomment:
That example also Works For Me: % namespace eval foo {namespace eval bar { namespace delete foo } } unknown namespace "foo" in namespace delete command Result appears correct. - login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [7b3ad8236c] (rid 147876) by dkf on 2016-07-11 18:16:34:
- icomment:
That's weird. I'm trying exactly with 8.6 tip in <tt>--enable-symbols=mem</tt>, and I just get this (cut-n-paste from my terminal): <verbatim> cspool92:unix dkf$ make shell Warning: tclOOStubInit.c may be out of date. Developers may want to run "make genstubs" to regenerate. This warning can be safely ignored, do not report as a bug! DYLD_LIBRARY_PATH=`pwd`: TCLLIBPATH="/Users/dkf/Documents/software/tcl8.6/unix/pkgs" TCL_LIBRARY="/Users/dkf/Documents/software/tcl8.6/library" ./tclsh % namespace eval foo {namespace eval bar { namespace delete foo } } Trying to incr ref count of Tcl_Obj allocated in another thread make: *** [shell] Abort trap: 6 cspool92:unix dkf$ head config.log This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tcl configure 8.6, which was generated by GNU Autoconf 2.59. Invocation command line was $ ./configure --enable-symbols=mem ## --------- ## ## Platform. ## cspool92:unix dkf$ gcc --version gcc (MacPorts gcc5 5.3.0_1) 5.3.0 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. </verbatim> I really hope that the compiler version isn't significant! - login: "dkf"
- mimetype: "text/x-fossil-wiki"
- username: "dkf"
- icomment:
Ticket change [ce48a56578] (rid 147880) by dgp on 2016-07-11 20:02:44:
- icomment:
That was the clue I needed. Reproduced. Will pursue.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [21d96859e4] (rid 147882) by dgp on 2016-07-11 21:57:11:
- closedate changed to: "2457581.41471601"
- closer changed to: "dgp"
- icomment:
Fix committed.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"