mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-26 22:00:37 +02:00
r600/llvm: initialize radeon_llvm_binary
use memset to initialize to 0's... otherwise code_size and config_size
could be uninitialized when read later in this method.
It's also hard to do NULL checks on uninitialized pointers.
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
v2: Fix indentation
CC: "10.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit dd73b99420)
This commit is contained in:
parent
e9f8b78278
commit
f843604b6a
1 changed files with 1 additions and 0 deletions
|
|
@ -712,6 +712,7 @@ unsigned r600_llvm_compile(
|
|||
const char * gpu_family = r600_llvm_gpu_string(family);
|
||||
unsigned i;
|
||||
|
||||
memset(&binary, 0, sizeof(struct radeon_llvm_binary));
|
||||
r = radeon_llvm_compile(mod, &binary, gpu_family, dump);
|
||||
|
||||
assert(binary.code_size % 4 == 0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue