News for hackers. Stuff that matters.
Re:Zig monthly, October 2021: Games, gamedev, Elixir, tools ... by tialaramex on Wednesday November 03, 2021 @04:35PM (#29099929)
If you want these checks in "ReleaseSafe" mode of your Rust, you can choose to make such a build profile:

[profile.ReleaseSafe] overflow-checks = true

And of course Rust has both Wrapping types and wrapping versions of each integer operation if you want those, although I think we can be confident that the sort of person who is shipping release builds with overflow checking isn't thinking far enough ahead to have decided what should actually happen when their variabes under/overflow so giving them the option is redundant.

Given that the problem here is they're Wrangling Untrusted File Formats and, unsurprisingly, they failed to do so Safely, they likely should have used WUFFS rather than Rust, or Zig, or any general purpose language.

There are no comments on this comment yet.