diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2020-12-30 15:05:43 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-12-30 15:09:21 +0000 |
commit | 9efe3bfcb2b1c3613dddc8761425aa6943fa162d (patch) | |
tree | b3a3c5e94bc1c782cbbe44aff1576a9075f2e160 /lib/sw_sync.c | |
parent | 0f2e314244e553ea6015da2a51b1ccabe36b33d9 (diff) |
lib: Clear kernel output buffers for valgrind
Clear a couple of output buffers written to by the kernel so that
valgrind is not confused.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'lib/sw_sync.c')
-rw-r--r-- | lib/sw_sync.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sw_sync.c b/lib/sw_sync.c index b6f70b3c..6c762c8b 100644 --- a/lib/sw_sync.c +++ b/lib/sw_sync.c @@ -183,7 +183,7 @@ int sync_fence_count(int fd) uint64_t sync_fence_timestamp(int fd) { - struct sync_fence_info fence; + struct sync_fence_info fence = {}; struct sync_file_info info = { .sync_fence_info = to_user_pointer(&fence), .num_fences = 1, @@ -195,6 +195,7 @@ uint64_t sync_fence_timestamp(int fd) if (info.num_fences > 1) return 0; + igt_assert(fence.timestamp_ns); return fence.timestamp_ns; } |