mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
radeonsi: Refuse to accept code with unhandled relocations
They might lead to unrecoverable GPU hang.
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 9baacf3fa7)
This commit is contained in:
parent
1a0b75aa16
commit
b9d1ef5035
1 changed files with 6 additions and 0 deletions
|
|
@ -221,6 +221,12 @@ static void *si_create_compute_state(
|
|||
const amd_kernel_code_t *code_object =
|
||||
si_compute_get_code_object(program, 0);
|
||||
code_object_to_config(code_object, &program->shader.config);
|
||||
if (program->shader.binary.reloc_count != 0) {
|
||||
fprintf(stderr, "Error: %d unsupported relocations\n",
|
||||
program->shader.binary.reloc_count);
|
||||
FREE(program);
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
si_shader_binary_read_config(&program->shader.binary,
|
||||
&program->shader.config, 0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue