Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f047f8d0ea76b50078fe95a9fef4fefa7aaff158c0317254394f7aafa5508a6d
Ticket: aaa02c55b9cb7b62c39bb02a7631ccd88fd00295
lrange with huge index, weird results
User & Date: jan.nijtmans on 2017-11-03 10:42:01
Changes

  1. icomment:
    First shot for proposed solution in branch "bug-aaa02c55b9". For Tcl8 I would like to clamp the values between INT_MIN and INT_MAX. I don't think that's too dangerous, since we can allready use INT_MAX in scripts directly: We must already handle that, anywhere we are failing to do so is a bug.
    
    For Tcl9, I would like to modify the API (which is just internal, so that's OK) to use "size_t *" in stead of "int *". Then we can clamp between -1 (represented as (size_t)-1) and LLONG_MAX (actually (size_t)-2), which is sufficiently for all future memory limitations. ;-)
    
    TIP is in preparation (sofar only in my mind yet ...)
    
  2. login: "jan.nijtmans"
  3. mimetype: "text/x-fossil-wiki"