leftpaddotpy, software engineering strategy: make the program crash and dump core cleanly and early.
fun fact: signed overflow can be made to crash 100% of the time in a substantive code base with nearly zero (gcc) to immeasurably low overhead (clang). and then you don't have to think about it doing unpredictable UB ever again.
simply pass: -fsanitize=signed-integer-overflow -fsanitize-undefined-trap-on-error to the compiler
in rust
[profile.release]
overflow-checks = true