Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
glsl/nir: fix gl_nir_cross_validate_outputs_to_inputs() memory leak
For instance, this issue is triggered with vs-to-fs-overlap.shader_test -auto -fbo: Direct leak of 24 byte(s) in 1 object(s) allocated from: #0 0x7fe64f58e9a7 in calloc (/usr/lib64/libasan.so.6+0xb19a7) android-rpi#1 0x7fe642ca2839 in _mesa_symbol_table_ctor ../src/mesa/program/symbol_table.c:286 android-rpi#2 0x7fe642ff003d in gl_nir_cross_validate_outputs_to_inputs ../src/compiler/glsl/gl_nir_link_varyings.c:728 android-rpi#3 0x7fe642d7c7d8 in gl_nir_link_glsl ../src/compiler/glsl/gl_nir_linker.c:1357 #4 0x7fe642be6931 in st_link_glsl_to_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:562 #5 0x7fe642be6931 in st_link_shader ../src/mesa/state_tracker/st_glsl_to_nir.cpp:944 #6 0x7fe642acab55 in link_program ../src/mesa/main/shaderapi.c:1336 #7 0x7fe642acab55 in link_program_error ../src/mesa/main/shaderapi.c:1447 #8 0x7fe6424aa389 in _mesa_unmarshal_LinkProgram src/mapi/glapi/gen/marshal_generated2.c:1911 #9 0x7fe641fd912b in glthread_unmarshal_batch ../src/mesa/main/glthread.c:139 #10 0x7fe641f48d48 in util_queue_thread_func ../src/util/u_queue.c:309 #11 0x7fe641fa442a in impl_thrd_routine ../src/c11/impl/threads_posix.c:67 Fixes: 7d1948e ("glsl: implement cross_validate_outputs_to_inputs() in nir linker") Signed-off-by: Patrick Lerda <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27071> (cherry picked from commit bacace8634346f853547f51a0ea6ff8082a8dcb8)
- Loading branch information