Skip to content

setup: fix out of bound access

Lionel Landwerlin requested to merge llandwerlin/crucible:review/oob-setup into main

Found with valgrind :

crucible: start  : func.buffer.update_buffer_offset.q0
==505314== Thread 2:
==505314== Invalid read of size 8
==505314==    at 0x136D4F: t_setup_vulkan (t_phase_setup.c:410)
==505314==    by 0x134F45: t_enter_setup_phase (t_phases.c:38)
==505314==    by 0x1355EF: t_enter_next_phase (t_phases.c:167)
==505314==    by 0x13AE78: t_thread_release (t_thread.c:142)
==505314==    by 0x13BDDF: t_thread_release_wrapper (test.c:236)
==505314==    by 0x13AAF3: test_thread_start (t_thread.c:60)
==505314==    by 0x4CCEB59: start_thread (pthread_create.c:444)
==505314==    by 0x4D5F463: clone (clone.S:100)
==505314==  Address 0x75e3dd8 is 0 bytes after a block of size 5,720 alloc'd
==505314==    at 0x4845828: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==505314==    by 0x136BA3: t_setup_vulkan (t_phase_setup.c:380)
==505314==    by 0x134F45: t_enter_setup_phase (t_phases.c:38)
==505314==    by 0x1355EF: t_enter_next_phase (t_phases.c:167)
==505314==    by 0x13AE78: t_thread_release (t_thread.c:142)
==505314==    by 0x13BDDF: t_thread_release_wrapper (test.c:236)
==505314==    by 0x13AAF3: test_thread_start (t_thread.c:60)
==505314==    by 0x4CCEB59: start_thread (pthread_create.c:444)
==505314==    by 0x4D5F463: clone (clone.S:100)

Signed-off-by: Lionel Landwerlin lionel.g.landwerlin@intel.com

Merge request reports