It's going to be a real strategy to write your code in releasesafe, identify hot code, and mark it off as releasefast on a function by function basis
Develop in debug mode, deploy in safe release mode, and when you're absolutely sure that everything is safe, you can switch to the fast release mode.
It is also possible to selectively disable/enable safety for individual code blocks.
Alternatively, there may be unfound overflow bugs in that C/C++ code.
Worth noting that UB is also checked in ReleaseSafe mode. Related issue: https://github.com/ziglang/zig/issues/2301
Re:Zig 0.7.0 tagged
by secondcoming on Sunday November 08, 2020 @05:15PM
(#25029615)
Only with signed ints, since unsigned overflow is defined behaviour.
Re:Zig 0.7.0 tagged
by gameswithgo on Sunday November 08, 2020 @05:07PM
(#25029552)
probably deploy in saferelease mode always unless you are making something like a single player video game, or that otherwise has incredible performance needs but does not deal with untrusted data.
So, to be safe people should build both Debug and Release?