Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
radeonsi/gfx10: fix main_shader_part_ngg_es memory leak
Indeed, main_shader_part_ngg_es was not freed. For instance, this issue is triggered on a radeonsi/gfx10 gpu with "piglit/bin/arb_gpu_shader5-tf-wrong-stream-value -auto -fbo": Direct leak of 1464 byte(s) in 1 object(s) allocated from: #0 0x7f17904b99a7 in calloc (/usr/lib64/libasan.so.6+0xb19a7) #1 0x7f1785d65ac2 in si_init_shader_selector_async ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:3132 #2 0x7f1783af67d8 in util_queue_thread_func ../src/util/u_queue.c:309 #3 0x7f1783b51dfa in impl_thrd_routine ../src/c11/impl/threads_posix.c:67 #4 0x7f178f69d38a (/lib64/libc.so.6+0x8438a) Indirect leak of 2024 byte(s) in 1 object(s) allocated from: #0 0x7f17904b97ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef) #1 0x7f1785d5443a in read_chunk ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:221 #2 0x7f1785d62cf5 in si_load_shader_binary ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:293 #3 0x7f1785d65255 in si_shader_cache_load_shader ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:423 #4 0x7f1785d65ef9 in si_init_shader_selector_async ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:3169 #5 0x7f1783af67d8 in util_queue_thread_func ../src/util/u_queue.c:309 #6 0x7f1783b51dfa in impl_thrd_routine ../src/c11/impl/threads_posix.c:67 #7 0x7f178f69d38a (/lib64/libc.so.6+0x8438a) Fixes: 8f72f13 ("radeonsi/gfx10: add as_ngg variant for TES as ES to select Wave32/64") Signed-off-by: Patrick Lerda <[email protected]> Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27958> (cherry picked from commit f93f215)
- Loading branch information