[Mesa-dev] leaks and invalid memory accesses in shader linking

Ilia Mirkin imirkin at alum.mit.edu
Sun Sep 27 18:30:51 PDT 2015


This is what I see when I run

valgrind --leak-check=full bin/shader_runner
tests/spec/arb_shader_atomic_counters/execution/vs-simple-inc-dec-read.shader_test
-fbo -auto

Anybody know what's going on with these?

Cheers,

  -ilia

==7899== Invalid read of size 4
==7899==    at 0x483C3DC: memcpy (vg_replace_strmem.c:916)
==7899==    by 0x59FEBB3: _mesa_propagate_uniforms_to_driver_storage
(uniform_query.cpp:562)
==7899==    by 0x5AEA113: _mesa_associate_uniform_storage (ir_to_mesa.cpp:2486)
==7899==    by 0x5AD0937: get_mesa_program(gl_context*,
gl_shader_program*, gl_shader*) (st_glsl_to_tgsi.cpp:6009)
==7899==    by 0x5AD12FF: st_link_shader (st_glsl_to_tgsi.cpp:6223)
==7899==    by 0x5AEBB7F: _mesa_glsl_link_shader (ir_to_mesa.cpp:2983)
==7899==    by 0x59A8DCF: link_program (shaderapi.c:1037)
==7899==    by 0x59AA5C7: _mesa_LinkProgram (shaderapi.c:1507)
==7899==    by 0x50B39AB: shared_dispatch_stub_509 (glapi_mapi_tmp.h:19702)
==7899==    by 0x48F59C7: stub_glLinkProgram (in
/home/ilia/piglit/lib/libpiglitutil_gl.so.0)
==7899==  Address 0x7730650 is 0 bytes after a block of size 24 alloc'd
==7899==    at 0x4838E48: calloc (vg_replace_malloc.c:623)
==7899==    by 0x5BF2E83: ralloc_size (ralloc.c:113)
==7899==    by 0x5BF2F2B: rzalloc_size (ralloc.c:134)
==7899==    by 0x5BF31FB: rzalloc_array_size (ralloc.c:196)
==7899==    by 0x5C0315F:
link_assign_uniform_locations(gl_shader_program*, unsigned int)
(link_uniforms.cpp:1146)
==7899==    by 0x5C1327B: link_shaders(gl_context*,
gl_shader_program*) (linker.cpp:4004)
==7899==    by 0x5AEBB5B: _mesa_glsl_link_shader (ir_to_mesa.cpp:2979)
==7899==    by 0x59A8DCF: link_program (shaderapi.c:1037)
==7899==    by 0x59AA5C7: _mesa_LinkProgram (shaderapi.c:1507)
==7899==    by 0x50B39AB: shared_dispatch_stub_509 (glapi_mapi_tmp.h:19702)
==7899==    by 0x48F59C7: stub_glLinkProgram (in
/home/ilia/piglit/lib/libpiglitutil_gl.so.0)
==7899==
PIGLIT: {"result": "pass" }
==7899==
==7899== HEAP SUMMARY:
==7899==     in use at exit: 14,348 bytes in 83 blocks
==7899==   total heap usage: 71,036 allocs, 70,953 frees, 17,106,253
bytes allocated
==7899==
==7899== 8 bytes in 1 blocks are definitely lost in loss record 3 of 29
==7899==    at 0x4836734: malloc (vg_replace_malloc.c:296)
==7899==    by 0x5C03CEF: string_to_uint_map::iterate(void (*)(char
const*, unsigned int, void*), void*) (hash_table.h:244)
==7899==    by 0x5C0311B:
link_assign_uniform_locations(gl_shader_program*, unsigned int)
(link_uniforms.cpp:1140)
==7899==    by 0x5C1327B: link_shaders(gl_context*,
gl_shader_program*) (linker.cpp:4004)
==7899==    by 0x5AEBB5B: _mesa_glsl_link_shader (ir_to_mesa.cpp:2979)
==7899==    by 0x59A8DCF: link_program (shaderapi.c:1037)
==7899==    by 0x59AA5C7: _mesa_LinkProgram (shaderapi.c:1507)
==7899==    by 0x50B39AB: shared_dispatch_stub_509 (glapi_mapi_tmp.h:19702)
==7899==    by 0x48F59C7: stub_glLinkProgram (in
/home/ilia/piglit/lib/libpiglitutil_gl.so.0)


More information about the mesa-dev mailing list