Skip to content
Tcl Source Code History Of Ticket cea0344a51072386
Login

History Of Ticket cea0344a51072386

Artifacts Associated With Ticket cea0344a51072386

  1. Ticket change [e814c8c11b] (rid 147815) by dkf on 2016-07-10 07:32:38:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. 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.
      
    5. is_private initialized to: "0"
    6. login: "dkf"
    7. priority initialized to: "5 Medium"
    8. resolution initialized to: "None"
    9. severity initialized to: "Critical"
    10. status initialized to: "Open"
    11. submitter initialized to: "dkf"
    12. subsystem initialized to: "21. [namespace]"
    13. type initialized to: "Bug"
  2. Ticket change [f951dd1c8d] (rid 147816) by dkf on 2016-07-10 07:33:11:

    1. assignee changed to: "dgp"
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. priority changed to: "9 Immediate"
    5. title changed to: "Crash from ensemble handling"
  3. Ticket change [67514686fc] (rid 147834) by dgp on 2016-07-10 14:35:11:

    1. 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?
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. resolution changed to: "Works For Me"
  4. Ticket change [44a13d0bee] (rid 147850) by dkf on 2016-07-10 22:45:01:

    1. 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.
      
    2. login: "dkf"
    3. mimetype: "text/x-fossil-wiki"
  5. Ticket change [4e17e3452e] (rid 147869) by dgp on 2016-07-11 15:54:19:

    1. 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.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  6. Ticket change [7b3ad8236c] (rid 147876) by dkf on 2016-07-11 18:16:34:

    1. 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!
      
    2. login: "dkf"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "dkf"
  7. Ticket change [ce48a56578] (rid 147880) by dgp on 2016-07-11 20:02:44:

    1. icomment:
      
      That was the clue I needed.   Reproduced.  Will pursue.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  8. Ticket change [21d96859e4] (rid 147882) by dgp on 2016-07-11 21:57:11:

    1. closedate changed to: "2457581.41471601"
    2. closer changed to: "dgp"
    3. icomment:
      
      Fix committed.
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"