mirror of
https://codeberg.org/ziglang/zig
synced 2026-11-18 07:05:05 +00:00
valgrind client requests for undefined values
with this change, when you assign undefined, zig emits a few
assembly instructions to tell valgrind that the memory is undefined
it's on by default for debug builds, and disabled otherwise. only
support for linux, darwin, solaris, mingw on x86_64 is currently
implemented.
--disable-valgrind turns it off even in debug mode.
--enable-valgrind turns it on even in release modes.
It's always disabled for compiler_rt.a and builtin.a.
Adds `@import("builtin").valgrind_support` which lets code know
at comptime whether valgrind client requests are enabled.
See #1989
This commit is contained in:
parent
c9fb5240d6
commit
db74832e40
6 changed files with 130 additions and 9 deletions
Loading…
Add table
Add a link
Reference in a new issue