Skip to content
Tcl Source Code History Of Ticket cf74deb33c
Login

History Of Ticket cf74deb33c

Artifacts Associated With Ticket cf74deb33c

  1. Ticket change [97515b46b4] (rid 144822) by msofer on 2016-01-31 05:55:10:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      Valgrind found two leaks triggered by oo.test and ooNext.test. Stack traces are:
      
      mig@X13:~/DEVEL/tcl-core/trunk/unix$ cat ERR.leaks 
      Leak #1
        0:  malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
        1:  TclpAlloc (tclAlloc.c:699)
        2:  Tcl_Alloc (tclCkalloc.c:1059)
        3:  AllocClass (tclOO.c:1539)
        4:  TclNRNewObjectInstance (tclOO.c:1790)
        5:  TclOO_Class_Create (tclOOBasic.c:198)
        6:  TclOOInvokeContext (tclOOCall.c:309)
        7:  TclOOObjectCmdCore (tclOO.c:2635)
        8:  PublicNRObjectCmd (tclOO.c:2451)
        9:  Dispatch (tclBasic.c:4353)
      -- oo.test: ==26247== 832 (528 direct, 304 indirect) bytes in 2 blocks are definitely lost in loss record 3 of 4
      
      Leak #2
        0:  malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
        1:  TclpAlloc (tclAlloc.c:699)
        2:  Tcl_Alloc (tclCkalloc.c:1059)
        3:  AllocObject (tclOO.c:568)
        4:  TclNRNewObjectInstance (tclOO.c:1773)
        5:  TclOO_Class_Create (tclOOBasic.c:198)
        6:  TclOOInvokeContext (tclOOCall.c:309)
        7:  TclOOObjectCmdCore (tclOO.c:2635)
        8:  PublicNRObjectCmd (tclOO.c:2451)
        9:  Dispatch (tclBasic.c:4353)
      -- ooNext2.test: ==26246== 832 (304 direct, 528 indirect) bytes in 2 blocks are definitely lost in loss record 2 of 2
      -- oo.test: ==26247== 1,248 (456 direct, 792 indirect) bytes in 3 blocks are definitely lost in loss record 4 of 4
      
    5. foundin initialized to: "trunk"
    6. is_private initialized to: "0"
    7. login: "msofer"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "214bb5765a5d2d4513fe393de9e8c8431e3e869a"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "msofer"
    14. subsystem initialized to: "35. TclOO Package"
    15. title initialized to: "OO leaks"
    16. type initialized to: "Bug"
  2. Ticket change [958a2c935c] (rid 144823) by msofer on 2016-01-31 05:55:25:

    1. assignee changed to: "dkf"
    2. login: "msofer"
    3. mimetype: "text/plain"
  3. Ticket change [b4eded59d6] (rid 144832) by dgp on 2016-01-31 23:55:51:

    1. icomment:
      
      Likely suspects are
      
      http://core.tcl.tk/tcl/tktview?name=593baa032c
      
      and
      
      http://core.tcl.tk/tcl/tktview?name=3d96b7076e
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  4. Ticket change [b5cb7ba48a] (rid 144841) by dkf on 2016-02-01 23:06:22:

    1. icomment:
      Those are very unspecific traces; they just tell me that the objects were allocated using <code>oo::class create</code>. Any chance of narrowing down which tests trigger the leaks?
      
    2. login: "dkf"
    3. mimetype: "text/html"
    4. username: "dkf"
  5. Ticket change [ceaf69bf31] (rid 144842) by dkf on 2016-02-01 23:07:35:

    1. icomment:
      (i.e., we are leaking classes, not normal instances.)
      
    2. login: "dkf"
    3. mimetype: "text/html"
    4. username: "dkf"
  6. Ticket change [a1e0f1146c] (rid 144843) by msofer on 2016-02-01 23:43:40:

    1. icomment:
      There is AFAIK no simple way to determine which test triggers the leak, as valgrind will (can?) only analyze the leaks on process shutdown. I guess one would have to run each test separately under valgrind.
      
    2. login: "msofer"
    3. mimetype: "text/plain"
  7. Ticket change [7b226f4a6e] (rid 144846) by dgp on 2016-02-02 12:50:54:

    1. icomment:
      
      Use the TCLTEST_OPTIONS env variable to govern the
      valgrind with tcltest package options.  Useful ones
      for narrowing causes are -file -match -verbose -skip
      
      I also advise check pre- and post- each of the bugfixes
      I mentioned before.  Knowing the patch that's bad can
      be as useful as knowing the test that triggers.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  8. Ticket change [46b2ebd092] (rid 144847) by dgp on 2016-02-02 18:54:12:

    1. icomment:
      dgp	oo.test leaks in oo-14.[678]
      
      dgp	ooNext2.test leaks in oo-call-1.2[01]
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  9. Ticket change [ace6dcba24] (rid 144848) by dgp on 2016-02-02 18:55:33:

    1. icomment:
      
      Likely suspect: inheritance and mixins.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  10. Ticket change [a78e3dfefb] (rid 144849) by dgp on 2016-02-02 20:08:38:

    1. icomment:
      Bisecting shows that at least the oo-14.7 leak
      arrives with checkin
      
      http://core.tcl.tk/tcl/info/9a6b1363308cade8
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  11. Ticket change [7f29373e84] (rid 144850) by dgp on 2016-02-03 13:00:46:

    1. icomment:
      
      Clear that the trouble lies in the refcount dance
      found in ReleaseClassContents(). These things
      are always tricky.
      
      Refcounts for several objects found on lists
      are bumped near the start.  Seems that these
      objects get taken odd the lists before another
      pass through the lists decrementing the refcounts
      is supposed to free them.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  12. Ticket change [1b41fb1196] (rid 144865) by dkf on 2016-02-04 10:03:10:

    1. icomment:
      The deletion code is by far the trickiest place in TclOO. It's particularly compounded by the way that <code>oo::object</code> and <code>oo::class</code> cross-reference themselves and each other. I strongly recommend only doing testing with <code>--enable-symbols=mem</code> enabled, as that catches a much higher proportion of bad behaviour (because it scribbles over memory when it releases).
      
    2. login: "dkf"
    3. mimetype: "text/html"
    4. username: "dkf"
  13. Ticket change [e2f6bd54a8] (rid 144869) by dgp on 2016-02-04 21:05:08:

    1. icomment:
      
      committing patch to trunk that stops the identified leaks
      in the test suite.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  14. Ticket change [8a64dd8da6] (rid 144872) by dgp on 2016-02-05 19:07:49:

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