Skip to content
Tcl Source Code History Of Ticket 442665
Login

History Of Ticket 442665

Artifacts Associated With Ticket 442665

  1. Ticket change [02b5172395] (rid 119693) by jikamens on 2001-07-19 06:19:49:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The function Tcl_GetsObjCmd in tclIOCmd.c can corrupt a
      freed object if it is called with objc == 3.  This is
      because it retrieves resultPtr and does not increment
      its reference count, but then calls Tcl_ObjSetVar2,
      which causes the retrieved resultPtr object to be
      released.  I will attach a patch, which I hope is
      correct (if not, please E-mail me and let me know why,
      so I can understand all of this better; I barely
      understand it).
      
      
    4. foundin initialized to: "obsolete: 8.3.1"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "jikamens"
    9. subsystem initialized to: "16. Commands A-H"
    10. title initialized to: "gets corrupts freed object"
    11. type initialized to: "Bug"
  2. Add attachment "diff" [af9ca6e175] (rid 97846) by jikamens on 2001-07-19 13:19:50.

  3. Ticket change [4ed4dccdfe] (rid 125710) by jikamens on 2001-07-19 13:19:50:

    1. icomment:
      
      
      File Added - 8593: diff
      
      
      
    2. login: "jikamens"
    3. mimetype: "text/plain"
    4. username: "jikamens"
  4. Ticket change [426b55c6e7] (rid 116379) by dgp on 2001-07-19 23:54:17:

    1. subsystem changed to: "24. Channel Commands"
    2. title changed to: "[gets] corrupts freed object"
  5. Ticket change [2254826416] (rid 130730) by andreas_kupries on 2001-07-20 00:31:05:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Regarding "Tcl_ObjSetVar2" releasing the interp result. I 
      took a look at the principal code, in "Tcl_SetVar2Ex" and 
      found that the interp result is only released in the case 
      of an error. In that case the result of the function is 
      NULL, and this condition is catched by "Tcl_GetsObjCmd". So 
      this shouldn't be a problem.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  6. Ticket change [a61f9936aa] (rid 98542) by andreas_kupries on 2001-07-20 00:38:23:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Still, in the code as is the call to "Tcl_GetsObj" can and 
      will directly modify the interp result without announcing 
      its reference in the case of objc == 2. This gave trouble 
      in the past with transformations, i.e. channel drivers, 
      which called back into the script level, thus modifying the 
      interp result, if they didn't do a save/restore on the 
      previous result.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  7. Ticket change [48b749cff7] (rid 99942) by andreas_kupries on 2001-07-20 01:18:59:

    1. assignee changed to: "andreas_kupries"
  8. Ticket change [8186848488] (rid 117053) by jikamens on 2001-07-20 02:10:52:

    1. icomment:
      Logged In: YES 
      user_id=274776
      
      Hmm.  I'm not following everything that Andreas is saying. 
      I confess that I didn't fully understand the mechanisms I
      was trying to fix.  But I assure you that TCL was
      core-dumping without my fix, and when I recompiled it with
      TCL_MEM_DEBUG, the call to Tcl_SetIntObj was failing,
      claiming that it was trying to set a disposed pointer.  When
      I recompiled with my fix, that error went away when
      TCL_MEM_DEBUG remained set and the coredump went away when I
      unset it.
      
      I don't think I have anything more useful to contribute :-).
      
      
      
    2. login: "jikamens"
    3. mimetype: "text/plain"
    4. username: "jikamens"
  9. Ticket change [87d4f42573] (rid 131767) by andreas_kupries on 2001-07-20 03:09:19:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Can you attach the script which produces the core dump to 
      this item ?
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  10. Ticket change [8c84eaad97] (rid 127755) by jikamens on 2001-07-20 03:16:21:

    1. icomment:
      Logged In: YES 
      user_id=274776
      
      No, I can't, because it's a large package (cbb, the Check
      Book Balancer) with lots of local customizations, and the
      coredump seems to be dependent on the specific data being
      imported, and I can't exactly send you my checkbook data.
      
      I had sort of hoped that the correctness of my fix would be
      apparent to someone who understands tcl's internals more
      than I do.  It was *mostly* apparent to me, and I barely
      understand the internals at all.  Apparently it's more
      complex than I thought.
      
      
      
    2. login: "jikamens"
    3. mimetype: "text/plain"
    4. username: "jikamens"
  11. Ticket change [6cd1a96d0f] (rid 128587) by andreas_kupries on 2001-08-07 05:19:00:

    1. closedate changed to: "2001-08-06T22:19:00"
    2. closer changed to: "andreas_kupries"
    3. icomment:
      Logged In: YES 
      user_id=75003
      
      Comitted.
      
      
    4. login: "andreas_kupries"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "andreas_kupries"
  12. Ticket change [599bb608ff] (rid 117998) by jikamens on 2001-08-07 07:37:10:

    1. closedate changed to: "2001-08-07T00:37:10"
    2. closer changed to: "jikamens"
    3. icomment:
      Logged In: YES 
      user_id=274776
      
      I'm finding this whole conversation really puzzling.  I'm
      sorry to keep repeating myself, but I find it necessary to
      do so....
      
      As I said, I can't comment on *why* there's a problem in the
      code.  All I know is that when I compiled TCL with memory
      debugging enabled, the memory debugging code told me quite
      explicitly that there was a problem, and after I applied the
      fix which I submitted, the problem went away.
      
      What I find puzzling is that you seem willing to write off
      this bug and close it without determining why I was seeing a
      problem before my fix and not afterwards.  It seems like you
      think I'm making up the bug report or something.  Why would
      I make up the fact that the TCL memory debugging code was
      reporting a problem before my fix and not reporting a
      problem afterwards?
      
      In short, it seems to me that you should not close the bug
      without taking any action until you have understood why I
      was seeing a problem, and it seems that you haven't done
      that.
      
      
      
    4. login: "jikamens"
    5. mimetype: "text/plain"
    6. username: "jikamens"
  13. Ticket change [4bbabd2e25] (rid 126759) by dgp on 2001-08-07 08:01:08:

    1. closedate changed to: "2001-08-07T01:01:08"
    2. closer changed to: "dgp"
    3. icomment:
      Logged In: YES 
      user_id=80530
      
      Why are you complaining?  Your patch was accepted into
      the development sources and will be part of releases
      Tcl 8.3.4 and Tcl 8.4a3.  Isn't that what you want?
      
      
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. username: "dgp"
  14. Ticket change [3a7b5a079b] (rid 112569) by jikamens on 2001-08-07 08:03:27:

    1. closedate changed to: "2001-08-07T01:03:27"
    2. closer changed to: "jikamens"
    3. icomment:
      Logged In: YES 
      user_id=274776
      
      Doh!  I was complaining because I thought my patch *wasn't*
      accepted!  I misread the bug report because I read it from
      top to bottom when I should have been reading it from bottom
      to top.  I find this interface which puts the description of
      the bug first but then puts comments from most to least
      recent quite confusing :-).
      
      Sorry about that.  Thanks.
      
      
      
    4. login: "jikamens"
    5. mimetype: "text/plain"
    6. username: "jikamens"