Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ab2e2016c06b782fd580d0d63d88de2d7a839b62c165f8c625aa0d0c1922ac84
Ticket: 1f40aa83c552f597c7aa2e01c7a3a5a2a3fe7c1c
crash with CFLAGS=-ftrapv
User & Date: sebres on 2024-03-22 19:31:46
Changes

  1. closedate changed to: "2460392.31373135"
  2. closer changed to: "sebres"
  3. icomment:
    Fixed now in [4fa26c98f225a44f]: the overflow check could indeed mistakenly pass in some cases (so basically needs <i>div 10</i> to do it properly);
    
    Additionally I optimized both str2int now, because we don't need to check it for most cases at all (up to 10 char and 18 chars accordingly), thus definitely faster now (bounds <b><code>O(n)+O(1) vs. O(n)+O(n)</code></b> in most cases, and has also fewer branch mispredictions now, essentially almost none anymore).<br/>
    Thus closed.
    
    P.S. I moved trap-pragma back, because although we may don't have tests right now, but someone can indeed compile it with trapping, and it can definitely overflow in format-scan, so would crash in that (surely obscure) cases. So if it is known, intentional code-piece, made on purpose, why not disable the trap?
    
  4. login: "sebres"
  5. mimetype: "text/x-fossil-wiki"
  6. resolution changed to: "Fixed"
  7. status changed to: "Closed"