Overview
| Artifact ID: | ab2e2016c06b782fd580d0d63d88de2d7a839b62c165f8c625aa0d0c1922ac84 |
|---|---|
| Ticket: | 1f40aa83c552f597c7aa2e01c7a3a5a2a3fe7c1c
crash with CFLAGS=-ftrapv |
| User & Date: | sebres on 2024-03-22 19:31:46 |
Changes
- closedate changed to: "2460392.31373135"
- closer changed to: "sebres"
- 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?
- login: "sebres"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"