Skip to content
Tcl Source Code History Of Ticket 92aeb847f9b92cfb
Login

History Of Ticket 92aeb847f9b92cfb

Artifacts Associated With Ticket 92aeb847f9b92cfb

  1. Ticket change [74d49b98a2] (rid 238962) by jan.nijtmans on 2025-04-10 14:21:03:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      Example (by Ashok):
      <pre>
      % proc xx [lrepeat 0x100000000 x] {}
      killed
      
      Or explicitly defining the proc in script
      
      % set l [lrepeat 0x100000000 x]; llength $l
      4294967296
      % writeFile manyargs.tcl [list proc xx $l {return $x}]
      % exit
      [apn@tcltk build]$ LD_LIBRARY_PATH=`pwd` ./tclsh manyargs.tcl 
      killed
      </pre>
      
      Note that this has no relation to TIP #626: Those examples don't
      have more than 2**31 command lines arguments, the "proc" command
      just has it's second command-line argument being a list with
      2**31 arguments. Since Tcl 9.0 already allows large list
      sizes, Tcl 9.0 should already be able to handle this.
      
      Since a proc with that many variable is unrealistic, setting this
      ticket as "minor"
      
    5. foundin initialized to: "9.0"
    6. is_private initialized to: "0"
    7. login: "jan.nijtmans"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "0c50e5320704d174412e57b873d8932de15303e0"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "jan.nijtmans"
    14. subsystem initialized to: "22. [proc] and [uplevel]"
    15. title initialized to: "proc with more than 2**31 variables"
    16. type initialized to: "Bug"
  2. Ticket change [660a520836] (rid 238969) by jan.nijtmans on 2025-04-10 14:46:19:

    1. icomment:
      After 'fix':
      <pre>
      $ ./tclsh
      % proc xx [lrepeat 0x100000000 x] {}
      total mallocs              202168073
      total frees                   130242
      current packets allocated  202037831
      current bytes allocated   43653712110
      maximum packets allocated  202037831
      maximum bytes allocated   43653712110
      procedure "xx": arg list contains too many (4294967296) entries
      %
      %
      % exit
      </pre>
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  3. Ticket change [6772f18789] (rid 239107) by jan.nijtmans on 2025-04-14 07:57:45:

    1. icomment:
      After better fix:
      <pre>
      $ ./tclsh
      % proc xx [lrepeat 0x100000000 x] {}
      total mallocs              163959265
      total frees                   130503
      current packets allocated  163828762
      current bytes allocated   41896099036
      maximum packets allocated  163828762
      maximum bytes allocated   41896099036
      procedure "xx": memory error
      %
      </pre>
      
      Actually, it depends where the allocation error occurs. It might happen
      in a Tcl_Alloc(), it also might happen in Tcl_CreateHashEntry().
      
      In the first case, we might use Tcl_AttemptAlloc() and do a proper cleanup. In the other case, we would need a Tcl_AttemptCreateHashEntry() (TIP!)
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  4. Ticket change [c99a8eb6c0] (rid 239194) by jan.nijtmans on 2025-04-15 22:21:55:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2460781.43189405"
    3. closer changed to: "jan.nijtmans"
    4. icomment: "Fixed [3af3ca8d988e9a1f|here]"
    5. login: "jan.nijtmans"
    6. mimetype: "text/x-fossil-wiki"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"