Skip to content
Tcl Source Code History Of Ticket 1333036
Login

History Of Ticket 1333036

Artifacts Associated With Ticket 1333036

  1. Ticket change [bd0a065aa8] (rid 101844) by msofer on 2005-10-20 10:05:31:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      (Bug reported on clt by neuronstorm at gmail dot com)
      
      mig@ave:/home/CVS/tcl_SF_clean/unix$ cat /tmp/test
      set a [list {1 b} {c d}]
      set b $a
      lset b 0 0 2  ;#change one subelement in the new list
      puts "{$a}:{$b}:[expr {$b == $a}]"
      mig@ave:/home/CVS/tcl_SF_clean/unix$ ./tclsh /tmp/test
      {{2 b} {c d}}:{{2 b} {c d}}:1
      
      Notes:
        1. The bug does not show at the console, nor within a
      proc body
        
      2. The bug does not show if the first line is replaced by
              set a {{1 b} {c d}}
      but it still appears when it is
              set a [list [list 1 b] [list c d]]
      
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "msofer"
    9. subsystem initialized to: "17. Commands I-L"
    10. title initialized to: "lset misshandles sublists"
    11. type initialized to: "Bug"
  2. Ticket change [ab305f03d6] (rid 101058) by msofer on 2005-10-20 18:00:23:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      (Thanks dkf) This duplicates the bug within a proc body by
      avoiding a literal that shares the first sublist.
      
      proc bar {} {
          set a [list [list 1 b] [list c d]]
          set b $a
          lset b 0 0 2  ;#change one subelement in the new list      
          puts stdout "a $a"
          puts stdout "b $b"
      };bar
      
      The problem is in the usage of the new List intrep that can
      be shared: duplicating the List does not cause the elements
      to be shared, the handling has not been done correctly in
      TclLsetFlat.
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  3. Ticket change [2b9aa891ca] (rid 118768) by msofer on 2005-10-20 19:22:34:

    1. closedate changed to: "2005-10-20T12:22:34"
    2. closer changed to: "msofer"
    3. resolution changed to: "Fixed"
    4. status changed to: "Closed"