|
From: Ivo R. <iv...@iv...> - 2017-11-15 21:37:41
|
2017-11-15 22:24 GMT+01:00 Andrew Kelley <sup...@gm...>: > Here is documented how to do client requests: > > http://valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.clientreq > > One thing that I would like to do is mark a range of memory as > "uninitialized" so that valgrind can report an error for "conditional move > or branch depends on uninitialized memory". ... > Zig has a "debug safety mode" where we can generate whatever code we want > for assigning undefined. > At the line `a = undefined` I want to generate code that tells valgrind to > mark the memory of `a` as uninitialized. > > Is this possible? Oh yes, please have a look here: http://valgrind.org/docs/manual/mc-manual.html#mc-manual.clientreqs In particular VALGRIND_MAKE_MEM_UNDEFINED and VALGRIND_MAKE_MEM_DEFINED_IF_ADDRESSABLE. I. |