Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b6b145860f2b4f01f3b2347d3ff1e32867ac0f24
Ticket: a3fb3356b76ec4a853d1b86aadc08675f8bef359
Segmentation fault due to int overflow in GrowEvaluationStack
User & Date: sebres on 2017-05-29 13:59:29
Changes

  1. foundin changed to: ">= 8.5"
  2. icomment:
    Thx for reporting!
    
    It should be indeed rewritten using ptrdiff_t resp. offset_t (no idea which of both will be supported by all platforms/compilers).
    size_t would be also a variant if "growth" used only to enlarge the stack (to be verified).
    
    But I did not yet understand what some large list has concertedly with the evaluation stack...
    Should the "names" be just not a variable name in such case?
    According to:
    <code><pre>
    % tcl::unsupported::disassemble script {lsort -unique $names}
    ByteCode 0x004E7F90, refCt 1, epoch 16, interp 0x004CAF58 (epoch 16)
      Source "lsort -unique $names"
      Cmds 1, src 20, inst 10, litObjs 3, aux 0, stkDepth 3, code/src 0.00
      Commands 1:
          1: pc 0-8, src 0-19
      Command 1: "lsort -unique $names"
        (0) push1 0         # "lsort"
        (2) push1 1         # "-unique"
        (4) push1 2         # "names"
        (6) loadStk
        (7) invokeStk1 3
        (9) done
    </pre></code>
    it does at all no matter how large the list is.
    
  3. login: "sebres"
  4. mimetype: "text/x-fossil-wiki"