vrend: silence false-positive use-of-uninitialized-value reported by fuzzer

Fuzzer detected a Use-of-uninitialized-value in p_atomic_dec_zero(),
which uses inline assembly on some platforms. MSAN's documentation claims
unreliable results when instrumenting functions with inline assembly. In
this case, `unsigned char c` is write-only and it's initial value isn't
important, just disable MSAN for p_atomic_dec_zero().

Signed-off-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: John Bates <jbates@chromium.org>
macos/master
Ryan Neph 3 years ago
parent 0d84775435
commit b9d859fbe6
  1. 3
      src/gallium/auxiliary/util/u_atomic.h

@ -45,6 +45,7 @@ extern "C" {
#define p_atomic_set(_v, _i) (*(_v) = (_i))
#define p_atomic_read(_v) (*(_v))
__attribute__((no_sanitize("memory")))
static inline boolean
p_atomic_dec_zero(int32_t *v)
{
@ -92,6 +93,7 @@ extern "C" {
#define p_atomic_set(_v, _i) (*(_v) = (_i))
#define p_atomic_read(_v) (*(_v))
__attribute__((no_sanitize("memory")))
static inline boolean
p_atomic_dec_zero(int32_t *v)
{
@ -204,6 +206,7 @@ extern "C" {
#define p_atomic_set(_v, _i) (*(_v) = (_i))
#define p_atomic_read(_v) (*(_v))
__attribute__((no_sanitize("memory")))
static inline boolean
p_atomic_dec_zero(int32_t *v)
{

Loading…
Cancel
Save