Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 07dae3cbec005bac91b699dfc96a9580d7e8f8bee7482df2b0401b606fb19818
Ticket: d2a3c5f80bf47362e2a9ab02152cceadc916ba24
test lseq hangs with -Os
User & Date: sebres on 2024-12-20 16:40:23
Changes

  1. icomment:
    The UB is UB and that says everything... sometimes compilers behaves as the developer expects, sometimes - not.
    What you are calling trivial, is basically not so - the test speculates (quite rightly) that the series are small and therefore the cycles of UpdateStringOfArithSeries will be short and it runs fast. But everything changes if it gets affected by the UB (for whatever reason it happens, even by a compiler "bug" on some circumstances).
    Anyway, what you see is an after-effect and it is caused by failed conversion for len of doubles <i>start - end</i> and/or the double <i>step</i>. The evidence for that is there - the series with given step/len like in test <i>[lseq {1e50+0} {1e50+1} 1]</i> (with given step), as well as such with <i>count</i> argument don't cause a hang.
    
    However as already wrote, besides this issue, I found many others, inclusive SF, panics (because of not correct type behaviour in callbacks), and possible numeric instability. And the number of them grows with almost every new test, I provide.
    
  2. login: "sebres"
  3. mimetype: "text/x-fossil-wiki"