Skip to content
Snippets Groups Projects
Commit d5fe3f73 authored by Sergii Romantsov's avatar Sergii Romantsov Committed by Dylan Baker
Browse files

nir/large_constants: more careful data copying


A filed of nir_variable.location may be equel to -1.
That may cause copying to invalid address of list-node,
making some internal fields corrupted.

Patch fixes segfault during freeing context due to
corrupted address of ralloc_header.destructor.

v2: copy data if var is constant (Connor Abbott)

CC: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Fixes: b6d47535 (nir/large_constants: De-duplicate constants)
Signed-off-by: default avatarSergii Romantsov <sergii.romantsov@globallogic.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111676


Reviewed-by: default avatarConnor Abbott <cwabbott0@gmail.com>
(cherry picked from commit c7b2a2fd)
parent 5650308d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment