Skip to content
Tcl Source Code History Of Ticket cc1e91552c
Login

History Of Ticket cc1e91552c

Artifacts Associated With Ticket cc1e91552c

  1. Ticket change [13d71f044b] (rid 168168) by max on 2019-01-07 17:00:06:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      tcl-8.6.8 and earlier:
      % list [list {*}[set a " "]]
      {}
      
      tcl-8.6.9:
      % list [list {*}[set a " "]]
      { }
      
      This breaks some 20 tests in the SQLite test suite.
      
    5. foundin initialized to: "8.6.9"
    6. is_private initialized to: "0"
    7. login: "max"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "ea2e7e88b12fd1848f0c1a3391db72e43c77fea0"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "max"
    14. subsystem initialized to: "14. List Object"
    15. title initialized to: "Regression in list expansion"
    16. type initialized to: "Bug"
  2. Ticket change [68aded8997] (rid 168169) by max on 2019-01-08 10:51:28:

    1. assignee changed to: "dgp"
    2. comment changed to:
        *  tcl-8.6.8 and earlier:
      <verbatim>
      % list [list {*}[set a " "]]
      {}
      </verbatim>
      
        *  tcl-8.6.9:
      <verbatim>
      % list [list {*}[set a " "]]
      { }
      </verbatim>
      
      This breaks some 20 tests in the SQLite test suite.
      
    3. icomment:
      Bisecting core-8-6-branch turned up [c9318a708c] as having caused the regression.
      
      Also, kbk found out that only the bytecoded <tt>list</tt> command is affected by the regression, but not the interpreted one:
      
      <verbatim>
      % list [list {*}[set a " "]]
      { }
      % set c list
      list
      % list [$c {*}[set a " "]]
      {}
      </verbatim>
      
    4. login: "max"
    5. mimetype: "text/x-fossil-wiki"
  3. Ticket change [f106eda9f7] (rid 168170) by max on 2019-01-08 11:16:05:

    1. login: "max"
    2. mimetype: "text/plain"
  4. Ticket change [7468816eb4] (rid 168180) by sebres on 2019-01-08 13:40:28:

    1. icomment:
      Fixed now in [e364d7f9ffcd2827], branch [./timeline?r=bug-cc1e91552c|bug-cc1e91552c].
      I'll merge it later if tested and no objections follow.
      
    2. login: "sebres"
    3. mimetype: "text/x-fossil-wiki"
    4. resolution changed to: "Fixed"
    5. status changed to: "Pending"
  5. Ticket change [63e9343b1c] (rid 168197) by sebres on 2019-01-09 10:13:35:

    1. closedate changed to: "2458492.92610837"
    2. closer changed to: "sebres"
    3. icomment: "merged in all branches >= 8.6"
    4. login: "sebres"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
  6. Ticket change [ed1c2f3d46] (rid 168228) by jan.nijtmans on 2019-01-11 08:06:56:

    1. assignee changed to: "sebres"
    2. closer changed to: "nobody"
    3. icomment:
      The fix commit appeared to cause a regression, reported by François Vogel. I'm wondering if the *goto* is correct at all. Therefore, reopening.
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/x-fossil-wiki"
    6. status changed to: "Open"
  7. Ticket change [ec67d8ac8a] (rid 168229) by sebres on 2019-01-11 12:07:02:

    1. icomment:
      Well, actually I doubt that the problem of François would be caused directly by this fix (possibly just an after-effect), because if I'm not wrong it can crash in two cases:
      
      1. in call of ListObjIsCanonical, but it is a nonsense, because either valuePtr is inaccessible and don't think so, because [/artifact/5718eaeee4fa7747?ln=5222|TclListObjGetElements] above by retrieving of list length (objc), or by check of the canonical flag (canonicalFlag) of list and it would be even weird, even because TclListObjGetElements always convert valuePtr to the list (tclListType) with proper list representation.
      
      2. within goto, but it is also hard to imagine (below INST_LIST_RANGE_IMM does this also [/artifact/5718eaeee4fa7747?ln=5260|for several cases] (e. g. if indices are out of range).
      
      So my assumption there are the possible after-effects like:
      
      - Ref-Counting issues, for example now it returns new object (refCount=0), where previously refCount was >=1.
      In this case the Tk miss the refCount increment somewhere.
      
      - Type-safety like conversion to another type in the in-between operations (hard to imagine, now as well as previously it is/was always a list in this case).
      
      - Another UB.
      
      Anyway, I'll try to find the reason.
      
      @François, is there any test-case I could use to reproduce the crash? Can you possibly provide a call-stack by the segfault.
      
    2. login: "sebres"
    3. mimetype: "text/x-fossil-wiki"
  8. Ticket change [83a9e8c5ef] (rid 168234) by jan.nijtmans on 2019-01-11 14:36:57:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2458495.10899839"
    3. closer changed to: "jan.nijtmans"
    4. icomment:
      Well, I managed to reproduce the problem. Fix committed here: [58c46e74b931d3a1].
      
      Your assumption that TclListObjGetElements() always results in a list object is wrong: In case of an empty string representation the empty string is returned.
      
    5. login: "jan.nijtmans"
    6. mimetype: "text/x-fossil-wiki"
    7. status changed to: "Closed"
  9. Ticket change [5ac1153c80] (rid 168235) by oehhar on 2019-01-11 14:57:33:

    1. closedate changed to: "2458495.12329888"
    2. closer changed to: "oehhar"
    3. icomment:
      For the records, here is the post by Francois reporting the regression:
      
      I'm trying to run the Tk test suite with the tip of core-8-6-branch in both Tcl and Tk repositories.
      
      Observation: tktest.exe crashes because it fails in loading the tcl86tg.dll
      
      This happens all with the tip of core-8-6-branch of Tk, i.e.:
      [https://core.tcl-lang.org/tk/info/36caa0cbfbc2cd5d]
      
      It crashes with the tip of Tcl core-8-6-branch, that is with:
      [https://core.tcl-lang.org/tcl/info/9d24a1b9db1ebb45]
      
      but this same tktest.exe does not crash when trying to load the Tcl dll built from the commit just before in the Tcl repository, i.e. with:
      [https://core.tcl-lang.org/tcl/info/1688d8f73ee06ffa]
      
      Looking at the apparently faulty commit [9d24a1b9db1ebb45] I have no idea about the reason for this failure to load the Tcl dll.
      
      Is anyone seeing the cause perhaps?
      
    4. login: "oehhar"
    5. mimetype: "text/x-fossil-wiki"
    6. username: "oehhar"
  10. Ticket change [3b4d6095b9] (rid 168236) by sebres on 2019-01-11 15:25:07:

    1. closedate changed to: "2458495.14244573"
    2. closer changed to: "sebres"
    3. icomment:
      > Your assumption that TclListObjGetElements() always results in a list object is wrong: In case of an empty string representation the empty string is returned. 
      
      You are right Jan, Thx.
      <pre>
      #define [/artifact?udc=1&name=688b67d0c051138d&ln=2403-2406&r=core-8-6-branch|TclListObjGetElements](interp, listPtr, objcPtr, objvPtr) \
          (((listPtr)->typePtr == &tclListType) \
      	    ? ((ListObjGetElements((listPtr), *(objcPtr), *(objvPtr))), TCL_OK)\
      	    : Tcl_ListObjGetElements((interp), (listPtr), (objcPtr), (objvPtr)))
      </pre>
      How one can see here, the object either already a list or (my assumtion was) it will be to list immeadiatelly after invocation of Tcl_ListObjGetElements.
      
      Just I really overlooked this block in scope it is not a list - [/artifact/0b7c55ad693411b7?r=core-8-6-branch&ln=435-439|Tcl_ListObjGetElements].
      
      Thank you again. 
      I'll try to construct a test-case for exacly this situation.
      
    4. login: "sebres"
    5. mimetype: "text/x-fossil-wiki"
  11. Ticket change [c926700098] (rid 168241) by sebres on 2019-01-11 16:37:49:

    1. closedate changed to: "2458495.19292861"
    2. icomment:
      So since [1671ba2d5c] the second regression (crash) is also covered now...
      
      Everybody has now new test-facility "testpurebytesobj" allowing creation of pure bytes object without internal representations (NULL's).
      
      Using this it's pretty simple to cover similar things, as well as to reproduce the crash, noticed by François (of course, only on branch before the Jan's fix [58c46e74b931d3a1]):
      
      <code><pre style="padding-left:10pt">
      load tcltest86 Tcltest
      lrange [testpurebytesobj] 0 1
      </pre></code>
      
    3. login: "sebres"
    4. mimetype: "text/x-fossil-wiki"
  12. Ticket change [58f7b0a99a] (rid 168346) by fvogel on 2019-01-20 19:17:02:

    1. closer changed to: "nobody"
    2. icomment:
      Could you please revisit this?
      
      I still see the problem at least with core-8-branch (didn't check with trunk or any other branch).
      
      It appears that the fix [58c46e74b931d3a1] that I confirmed to work got changed later (see [e94a8f9c8f9a6950]) and this changed fix is what was merged. However it does not work for me.
      
    3. login: "fvogel"
    4. mimetype: "text/x-fossil-wiki"
    5. resolution changed to: "None"
    6. status changed to: "Open"
  13. Ticket change [c5b256b363] (rid 168347) by fvogel on 2019-01-20 19:20:19:

    1. closedate changed to: "2458504.30577559"
    2. closer changed to: "fvogel"
    3. icomment:
      Apologies, please just forget about what I wrote below, it works. Not sure why I said otherwise. My repo must not have been up-to-date.
      
    4. login: "fvogel"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"