Skip to content
Tcl Source Code History Of Ticket aaa02c55b9cb7b62
Login

History Of Ticket aaa02c55b9cb7b62

Artifacts Associated With Ticket aaa02c55b9cb7b62

  1. Ticket change [d2b7338466] (rid 157656) by jan.nijtmans on 2017-11-03 08:56:53:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      <pre>% lrange {a b c} 15 end
      % lrange {a b c} 2147483649 end
      a b c</pre>
      
      This is strange. First result is as expected, second should give an empty list as result as well.
      
    5. foundin initialized to: "8.6"
    6. is_private initialized to: "0"
    7. login: "jan.nijtmans"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "jan.nijtmans"
    13. subsystem initialized to: "13. Index Object"
    14. title initialized to: "lrange with huge index, weird results"
    15. type initialized to: "Bug"
  2. Ticket change [e92c8e844d] (rid 157657) by sebres on 2017-11-03 09:43:47:

    1. icomment:
      Hi Jan,
      
      as you certainly know, the index is signed integer here, 
      thus just do `expr {int(2147483649)}` -> -2147483647 :)
      
      The options:
      - Rather the index should be retrieved as INT_MAX in such cases (which could be also too dangerous e. g. will unexpectedly return something for very large lists);
      - Or the API for indices should be rewritten to wide-int (incompatible then);
      - Or the error "integer too large" should be thrown (which will be certainly annoying sometimes).
      
    2. login: "sebres"
    3. mimetype: "text/plain"
  3. Ticket change [f047f8d0ea] (rid 157675) by jan.nijtmans on 2017-11-03 10:42:01:

    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"
  4. Ticket change [25607905d5] (rid 157676) by dgp on 2017-11-03 12:01:02:

    1. icomment:
      
      See also TIP 297.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  5. Ticket change [7d1480d1a7] (rid 157682) by jan.nijtmans on 2017-11-03 12:26:29:

    1. assignee changed to: "jan.nijtmans"
    2. login: "jan.nijtmans"
    3. mimetype: "text/plain"
  6. Ticket change [68c217f17a] (rid 173054) by jan.nijtmans on 2019-07-05 12:28:09:

    1. closedate changed to: "2458670.01955926"
    2. closer changed to: "jan.nijtmans"
    3. icomment:
      Since TIP #297 is in the core now, everything as expected now! Closing.
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
  7. Ticket change [42ebe0cdf4] (rid 173102) by dgp on 2019-07-05 14:37:49:

    1. closedate changed to: "2458670.10960336"
    2. closer changed to: "dgp"
    3. icomment:
      
      Just for the record, the behavior change was approved in TIP 502.
      
    4. login: "dgp"
    5. mimetype: "text/plain"