Skip to content
Tcl Source Code History Of Ticket 2023112
Login

History Of Ticket 2023112

Artifacts Associated With Ticket 2023112

  1. Ticket change [ba4a2175e4] (rid 129296) by das on 2008-07-21 00:13:35:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      oo-18.3 fails when running the testsuite with -singleproc 1.
      
      I've tracked this down to a conflict between the tests NRE-oo.4, namespace-42.8 and oo-18.3, all three are needed to get the failure...
      
      i.e. running the testsuite with the following options gives the output below:
      -singleproc 1 -verbose "bet" -file "NRE.test namespace.test oo.test" \
      -match "NRE-oo.4 namespace-42.8 oo-18.3"
      
      
      Tests running in interp:  build/tcltest
      Tests located in:  tcl/tests
      Tests running in:  build
      Temporary files stored in build
      Test files sourced into current interpreter
      Running tests that match:  NRE-oo.4 namespace-42.8 oo-18.3
      Skipping test files that match:  l.*.test
      Only running test files that match:  NRE.test namespace.test oo.test
      Tests began at Mon Jul 21 01:57:46 CEST 2008
      NRE.test
      ---- NRE-oo.4 start
      namespace.test
      ---- namespace-42.8 start
      oo.test
      ---- oo-18.3 start
      
      
      ==== oo-18.3 OO: define command support FAILED
      ==== Contents of test case:
      
          list [catch {oo::class create foo {error bar}} msg] $msg $errorInfo
      
      ---- Result was:
      1 bar {bar
          while executing
      "error bar"
          (in definition script for object "::foo" line 1)
          invoked from within
      "return -options $opt $msg"
          (class "::oo::class" constructor line 6)
          invoked from within
      "oo::class create foo {error bar}"}
      ---- Result should have been (exact matching):
      1 bar {bar
          while executing
      "error bar"
          (in definition script for object "::foo" line 1)
          invoked from within
      "oo::class create foo {error bar}"}
      ==== oo-18.3 FAILED
      
      
      Tests ended at Mon Jul 21 01:57:47 CEST 2008
      all.tcl:Total419Passed2Skipped416Failed1
      Sourced 3 Test Files.
      Files with failing tests: oo.test
      
      
      
      
    4. foundin initialized to: "obsolete: 8.6a1"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "das"
    10. subsystem initialized to: "35. TclOO Package"
    11. title initialized to: "oo-18.3 fails with -singleproc 1"
    12. type initialized to: "Bug"
  2. Ticket change [ff08f28c10] (rid 108692) by dkf on 2008-07-21 15:13:53:

    1. assignee changed to: "msofer"
    2. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      Huh!? That's bizarre! (I confirm that this is reproducible.)
      
      OK, initial suspicion is something to do with representation caching and literals that is ending up allowing the error to escape the [catch] in the class constructor script. Handing off to an expert on such things for a second opinion. (I've no idea what to do about this!)
      
      
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. priority changed to: "9 Immediate"
    6. username: "dkf"
  3. Ticket change [8d2ee6abab] (rid 127886) by msofer on 2008-07-30 04:58:02:

    1. icomment:
      Logged In: YES 
      user_id=148712
      Originator: NO
      
      Confirm reproducible, concur hard to explain. 
      
      Relieved that it exists pre-nre, so that that's not where to look. Specifically, it exists since the very first commit of TclOO to the Tcl tree on 2008-05-31 (on my machine setting 'ulimit -s unlimited' allows the NRE tests to run to completion). 
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  4. Ticket change [3f64905689] (rid 121448) by dgp on 2008-08-02 01:18:09:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      
      Probing reveals that the role
      of namespace-42.8 is just the
      command sequence:
      
          proc demo args {}
          rename demo {}
      
      And the role of NRE-oo.4 is
      just the command sequence
      
          oo::class create foo
          foo destroy
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  5. Ticket change [5dfed17489] (rid 115566) by dgp on 2008-08-02 01:23:18:

    1. assignee changed to: "dkf"
    2. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      
      So this interactive session
      demo's the bug, which appears
      to be within TclOO:
      
      % oo::class create foo {error bar}
      bar
      % set errorInfo
      bar
          while executing
      "error bar"
          (in definition script for object "::foo" line 1)
          invoked from within
      "oo::class create foo {error bar}"
      %
      %
      % oo::class create foo
      ::foo
      % foo destroy
      % proc demo args {}
      % rename demo {}
      % oo::class create foo {error bar}
      bar
      % set errorInfo
      bar
          while executing
      "error bar"
          (in definition script for object "::foo" line 1)
          invoked from within
      "return -options $opt $msg"
          (class "::oo::class" constructor line 6)
          invoked from within
      "oo::class create foo {error bar}"
      
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. username: "dgp"
  6. Ticket change [437f497407] (rid 116563) by dgp on 2008-08-02 01:35:02:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      
      The proc name "demo" is irrelevant,
      but the argument spec and body matter.
      
      There must be some interaction with
      the special "compile to no instructions"
      procs.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  7. Ticket change [6f30fd0c4d] (rid 100269) by dgp on 2008-08-02 02:28:54:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      
      Comment out line 343 of tclProc.c,
      
              ((Command *) cmd)->compileProc = TclCompileNoOp;
      
      and the test failure goes away (as well
      as no-op proc optimization).
      
      Suggests ugly possibility of memory
      corruption at the root of the problem?
      
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  8. Ticket change [9118991fba] (rid 120573) by dgp on 2008-08-02 02:33:53:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      
      Oops.  More likely is that the
      
          proc demo args {}; rename demo {}
      
      sequence has the effect of bumping
      the compileEpoch.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  9. Ticket change [d688b604a8] (rid 123824) by dgp on 2008-08-02 02:40:33:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      
      Confirming that theory, replace
      
          proc demo args {}; rename demo {}
      
      with
      
          testcmdtrace tracetest {}
      
      and see the same failure.  What those
      have in common is a bump of the
      compileEpoch.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  10. Ticket change [d8450cb51c] (rid 107407) by dgp on 2008-08-02 03:18:19:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      
      Somehow the "Horrible hack" at
      line 930 of tclOOMethod.c is
      being disrupted.  Indicates
      the value of iPtr->errorLine
      is being overwritten when not
      expected.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  11. Ticket change [26a45c9f7b] (rid 88384) by dgp on 2008-08-02 04:05:28:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      
      In the buggy scenario,
      Tcl_LogCommandInfo is getting
      called between the time the
      magic errorLine is set, and
      the time it is checked.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  12. Add attachment "2023112.patch" [2ac47d3778] (rid 118628) by dgp on 2008-08-03 11:54:14.

  13. Ticket change [b7a8b04866] (rid 125639) by dgp on 2008-08-03 11:54:14:

    1. icomment:
      
      
      File Added - 286867: 2023112.patch
      
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      
      The original prescription no longer
      reveals a bug, since NRE.test was
      renamed nre.test, and even sticking
      in the new names has the three tests
      in a different sequence that shows no
      test failure.
      
      Attached patch adds a new test
      oo-18.6 to replace the lucky trio.
      
      Attached patch also includes a fix
      for one of the bugs contributing to
      the test failure.  When an in-progress
      TEBC detects a bump of the compile
      epoch it calls on Tcl_EvalEx to
      evaluate (possibly redefined) commands
      rather than continue executing invalid
      bytecode.  Tcl_EvalEx does its own
      logging of errors to errorInfo.  When
      the Tcl_EvalEx returns though, TEBC
      still routes exceptions through its
      own handling machinery which here
      attempt to log to errorInfo a second
      time, and also replace a carefully
      crafted errorline value.  Fixing that
      is sufficient to make the test pass.
      
      There are other bugs discovered on
      this adventure.
      
      1) This scenario should never get into
      the mid-execution invalid bytecode
      situation to begin with.  The bytecode
      is known invalid before execution begins,
      but OO method body dispatch is currently
      failing to make the epoch check.
      
      2) The trickery with a magic errorline
      value truly is an ugly hack, and at least
      to my eyes should be easy enough to
      replace with something cleaner and more
      robust.
      
      I'll try to craft additional tests to
      reveal these other bugs independently.
      Once I get those filed, I'll be able
      to close this one.
      
      File Added: 2023112.patch
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  14. Ticket change [0378dbb0f3] (rid 119836) by dgp on 2008-08-03 11:54:15:

    1. assignee changed to: "dgp"
    2. priority changed to: "7 High"
  15. Ticket change [8e8d617baa] (rid 120128) by dgp on 2008-08-04 11:35:54:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      see 2037338
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  16. Ticket change [4858af355d] (rid 99868) by dgp on 2008-08-04 23:22:42:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      see 2037727.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  17. Ticket change [5da26e6f1e] (rid 115505) by dkf on 2008-08-19 05:27:25:

    1. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      1) would seem to indicate that there is a mistake in the copying of the epoch change detection code from the code to compile a procedure body to the code to compile a method body. That's a pure bug; my intention was that they should detect changes identically.
      
      2) is a hack. Non-hack replacements that are valid even with arbitrary traces are welcome. (I don't like using string processing for this because I worry about newlines. I suppose I could instead have written the constructor using a C-implemented method; the APIs for that are now much stronger than they were.)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  18. Ticket change [248d7c72c2] (rid 131121) by dgp on 2008-08-19 05:32:38:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      
      Issue 1) got re-reported as Tcl
      Bug 2037727, and has been fixed
      in the HEAD, but the fix could
      use some review.  See 2037727
      for more on that topic.
      
      Issue 2) is the remaining issue
      here.  I made one quick attempt
      to reduce the hack-factor, and
      failed.  I'm leaving this report
      open in hopes that can still be
      accomplished, but it's less of
      a priority now.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. priority changed to: "5 Medium"
    5. username: "dgp"
  19. Ticket change [825e293451] (rid 117228) by dkf on 2009-02-22 23:21:59:

    1. icomment:
      Note that issue 2 could also be resolved through the use of a suitably-coded C version of the class constructor.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  20. Ticket change [a5bf8d2298] (rid 110427) by dkf on 2012-05-18 06:54:17:

    1. assignee changed to: "dkf"
    2. icomment:
      Remaining task: reduce "hack factor" in class constructors
      
      
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. resolution changed to: "Remind"
    6. username: "dkf"
  21. Ticket change [c67cef7ead] (rid 121780) by dkf on 2012-05-20 16:22:09:

    1. closedate changed to: "2012-05-20T09:22:09"
    2. closer changed to: "dkf"
    3. icomment:
      
      
      allow_comments - 1
      
      Hack level reduced. No more DEADBEEF or UpCatch...
      
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "dkf"