Skip to content
Tcl Source Code History Of Ticket 1876793
Login

History Of Ticket 1876793

Artifacts Associated With Ticket 1876793

  1. Ticket change [64f0c98fb5] (rid 92863) by tallniel on 2008-01-21 22:18:35:

    1. assignee initialized to: "nijtmans"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      I am seeing a bus error on Mac OS X 10.4.11 (Intel) using current Tcl CVS HEAD. A minimal script to reproduce the crash is the following:
      
      proc foo args {
          set n [lrange $args 0 end]
          lreverse [lrange $n 0 end-1]
      }
      foo bar
      
      I'm not entirely sure where the problem lies, but it seems to be some combination of the use of "args", the 2 uses of "lrange", and it seems to rely on the "end-N" syntax (just "lrange $n 0 end" doesn't cause a bus error). I suspect a tricky ref-counting bug somewhere and am investigating further. I'll add more here if I track it down.
      
      Neil
      
    4. foundin initialized to: "obsolete: 8.5.1"
    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: "tallniel"
    10. subsystem initialized to: "14. List Object"
    11. title initialized to: "Odd crash with args/lreverse/lrange combination"
    12. type initialized to: "Bug"
  2. Ticket change [e0c6c22f4c] (rid 87338) by tallniel on 2008-01-22 05:33:21:

    1. icomment:
      Logged In: YES 
      user_id=102050
      Originator: YES
      
      gdb isn't showing much interesting as is typical with ref-counting bugs: the location of the error is well removed from where the memory violation shows up. An even more minimal script is:
      
      lreverse [lrange [lrange foo 0 end] 0 end-1]
      or
      lreverse [lrange [lrange foo 0 end-1] 0 end]
      
      Both lreverse and the end-1 syntax seem to be needed, but "args" is a red herring.
      
      
    2. login: "tallniel"
    3. mimetype: "text/plain"
    4. username: "tallniel"
  3. Ticket change [c60a8ebc57] (rid 121697) by tallniel on 2008-01-22 05:34:15:

    1. priority changed to: "9 Immediate"
  4. Ticket change [0a8b658a75] (rid 113837) by tallniel on 2008-01-22 05:34:29:

    1. priority changed to: "8"
  5. Ticket change [8af5a4d7eb] (rid 127478) by tallniel on 2008-01-22 05:40:53:

    1. icomment:
      Logged In: YES 
      user_id=102050
      Originator: YES
      
      Gah, tracking it down even further, this could be a problem with shared literals for empty lists. The following also causes a bus error:
      lreverse [lrange [lrange {} 0 -1] 0 0]
      and the even the following:
      lreverse [lrange {} 0 -1]
      causes a bus error if it is the first use of an empty list in the program, but if you do say:
      set a {}
      lreverse [lrange {} 0 -1]
      then there is no crash.
      
      
    2. login: "tallniel"
    3. mimetype: "text/plain"
    4. username: "tallniel"
  6. Ticket change [c54f34b78b] (rid 111980) by hobbs on 2008-01-22 06:24:27:

    1. assignee changed to: "msofer"
    2. priority changed to: "9 Immediate"
  7. Ticket change [1e800b63e5] (rid 90986) by msofer on 2008-01-22 18:16:17:

    1. icomment:
      Logged In: YES 
      user_id=148712
      Originator: NO
      
      Even simpler:
      mig@uh:~$ /home/CVS/tcl_SF_clean/unix/tclsh
      % lreverse {}
      Segmentation fault
      
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  8. Ticket change [93765541ad] (rid 105821) by msofer on 2008-01-22 18:41:06:

    1. closedate changed to: "2008-01-22T11:41:06"
    2. closer changed to: "msofer"
    3. resolution changed to: "Fixed"
    4. status changed to: "Closed"
    5. title changed to: "lreverse crashes on unshared empty list"
  9. Ticket change [67d6b858bb] (rid 102963) by msofer on 2008-01-22 20:20:55:

    1. icomment:
      Logged In: YES 
      user_id=148712
      Originator: NO
      
      This was a bug in bugfix #1672585
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  10. Ticket change [c09203ae2e] (rid 102425) by dgp on 2008-01-23 00:00:26:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      
      I dispute that; but happy to
      see the fix anyway. :)
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"