0
Fork 0
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:
Andrew Kelley 2019-02-19 12:07:56 -05:00
commit db74832e40
No known key found for this signature in database
GPG key ID: 7C5F548F728501A9
6 changed files with 130 additions and 9 deletions