Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 9ea434a25e93165aec447dd478c4a0a353f001eaa9e667ab4b1adf33db0c420b
Ticket: d2a3c5f80bf47362e2a9ab02152cceadc916ba24
test lseq hangs with -Os
User & Date: sebres on 2024-12-19 22:09:59
Changes

  1. assignee changed to: "sebres"
  2. icomment:
    There are several UBs in handling around arith-series length calculation... 
    For instance if large doubles will be converted to wide-integer, it may become truncated, but results in unexpected large size, so an UpdateStringOfArithSeries may enter a cycle to calculate bytelengh for wrong number of elements, what by order of magnitude like 9223372036854775808 can take months to estimate the bytelength. By the way: inside the cycle of "pass 1: estimate space" the bytlen is not checked whether it is already larger than max-possible string, so the estimation cycle may continue up to the end (of enormous series).
    
    I'll fix this and similar UBs and extend it with more tests.
    
    However trying to find all corner cases I found another issue, what does a panic with "UpdateStringProc for type 'arithseries' failed to create a valid string rep", that also may cause sporadic segfault, where an in-place lrange from arith-series like above took place previously.
    
    WiP.
    
  3. login: "sebres"
  4. mimetype: "text/x-fossil-wiki"