mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +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>
This commit is contained in:
parent
2bc1680665
commit
dd73b99420
1 changed files with 1 additions and 0 deletions
|
|
@ -831,6 +831,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