subsurface-shot and yuv-buffer leaks in GL (Follow-up from "More leak fixes in tests, reported by ASan")
The following discussion from !647 (merged) should be addressed:
-
@leandrohrb started a discussion: (+1 comment) I've tested the patches and we still have two leaks related to the GL-renderer when running
subsurface-shot
andyuv-buffer
tests. Still haven't had the time to investigate further.Other than that, looks good to me!
Here is the log:
==61952==ERROR: LeakSanitizer: detected memory leaks Direct leak of 256 byte(s) in 1 object(s) allocated from: #0 0x7f4e5fe5c652 in __interceptor_realloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:164 #1 0x7f4e587e4a5a (<unknown module>) #2 0x7f4e587e4eda (<unknown module>) #3 0x7f4e5f98dc26 in __pthread_once_slow (/usr/lib/../lib/libpthread.so.0+0x10c26) #4 0x7f4e587ee7e1 (<unknown module>) #5 0x7f4e58c8850b (/usr/lib/libLLVM-12.so+0x16e50b) #6 0x7f4e5a887e93 (/usr/lib/../lib/libEGL_mesa.so.0+0x17e93) #7 0x7f4e5a88df3b (/usr/lib/../lib/libEGL_mesa.so.0+0x1df3b) #8 0x7f4e5a87bbd1 (/usr/lib/../lib/libEGL_mesa.so.0+0xbbd1) #9 0x7f4e5b9c7898 in gl_renderer_setup_egl_display ../libweston/renderer-gl/egl-glue.c:482 #10 0x7f4e5b9e2f69 in gl_renderer_display_create ../libweston/renderer-gl/gl-renderer.c:3621 #11 0x7f4e5c224080 in headless_gl_renderer_init ../libweston/backend-headless/headless.c:412 #12 0x7f4e5c224451 in headless_backend_create ../libweston/backend-headless/headless.c:454 #13 0x7f4e5c2247e7 in weston_backend_init ../libweston/backend-headless/headless.c:521 #14 0x7f4e5f587cc8 in weston_compositor_load_backend ../libweston/compositor.c:8200 #15 0x7f4e5fd77442 in load_headless_backend ../compositor/main.c:2671 #16 0x7f4e5fd7b540 in load_backend ../compositor/main.c:3073 #17 0x7f4e5fd7da07 in wet_main ../compositor/main.c:3356 #18 0x555697599cda in execute_compositor ../tests/weston-test-fixture-compositor.c:432 #19 0x55569759d97a in weston_test_harness_execute_as_client ../tests/weston-test-runner.c:528 #20 0x55569758dd8c in fixture_setup ../tests/subsurface-shot-test.c:64 #21 0x55569758de54 in fixture_setup_run_ ../tests/subsurface-shot-test.c:66 #22 0x55569759df35 in main ../tests/weston-test-runner.c:661 #23 0x7f4e5f9d9b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24) #24 0x55569758d77d in _start (/home/lele/weston/build/tests/test-subsurface-shot+0xb77d) Direct leak of 64 byte(s) in 1 object(s) allocated from: #0 0x7f4e5fe5dca1 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99 #1 0x7f4e587c68f2 (<unknown module>) #2 0x7f4e607bce2d in call_init (/lib64/ld-linux-x86-64.so.2+0xfe2d) #3 0x7f4e607bcf1b in _dl_init (/lib64/ld-linux-x86-64.so.2+0xff1b) #4 0x7f4e5faead44 in __GI__dl_catch_exception (/usr/lib/libc.so.6+0x138d44) #5 0x7f4e607c1209 in dl_open_worker (/lib64/ld-linux-x86-64.so.2+0x14209) #6 0x7f4e5faeace7 in __GI__dl_catch_exception (/usr/lib/libc.so.6+0x138ce7) #7 0x7f4e607c09ba in _dl_open (/lib64/ld-linux-x86-64.so.2+0x139ba) #8 0x7f4e5f9ab36b (/usr/lib/../lib/libdl.so.2+0x236b) #9 0x7f4e5faeace7 in __GI__dl_catch_exception (/usr/lib/libc.so.6+0x138ce7) #10 0x7f4e5faeadb2 in __GI__dl_catch_error (/usr/lib/libc.so.6+0x138db2) #11 0x7f4e5f9abb98 (/usr/lib/../lib/libdl.so.2+0x2b98) #12 0x7f4e5f9ab3f7 in dlopen (/usr/lib/../lib/libdl.so.2+0x23f7) #13 0x7f4e5fdf1e06 in __interceptor_dlopen /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:6261 #14 0x7f4e5a8984ef (/usr/lib/../lib/libEGL_mesa.so.0+0x284ef) #15 0x7f4e5a89d843 (/usr/lib/../lib/libEGL_mesa.so.0+0x2d843) #16 0x7f4e5a88a89a (/usr/lib/../lib/libEGL_mesa.so.0+0x1a89a) #17 0x7f4e5a88deaf (/usr/lib/../lib/libEGL_mesa.so.0+0x1deaf) #18 0x7f4e5a87bbd1 (/usr/lib/../lib/libEGL_mesa.so.0+0xbbd1) #19 0x7f4e5b9c7898 in gl_renderer_setup_egl_display ../libweston/renderer-gl/egl-glue.c:482 #20 0x7f4e5b9e2f69 in gl_renderer_display_create ../libweston/renderer-gl/gl-renderer.c:3621 #21 0x7f4e5c224080 in headless_gl_renderer_init ../libweston/backend-headless/headless.c:412 #22 0x7f4e5c224451 in headless_backend_create ../libweston/backend-headless/headless.c:454 #23 0x7f4e5c2247e7 in weston_backend_init ../libweston/backend-headless/headless.c:521 #24 0x7f4e5f587cc8 in weston_compositor_load_backend ../libweston/compositor.c:8200 #25 0x7f4e5fd77442 in load_headless_backend ../compositor/main.c:2671 #26 0x7f4e5fd7b540 in load_backend ../compositor/main.c:3073 #27 0x7f4e5fd7da07 in wet_main ../compositor/main.c:3356 #28 0x555697599cda in execute_compositor ../tests/weston-test-fixture-compositor.c:432 #29 0x55569759d97a in weston_test_harness_execute_as_client ../tests/weston-test-runner.c:528 #30 0x55569758dd8c in fixture_setup ../tests/subsurface-shot-test.c:64 #31 0x55569758de54 in fixture_setup_run_ ../tests/subsurface-shot-test.c:66 #32 0x55569759df35 in main ../tests/weston-test-runner.c:661 #33 0x7f4e5f9d9b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24) #34 0x55569758d77d in _start (/home/lele/weston/build/tests/test-subsurface-shot+0xb77d) SUMMARY: AddressSanitizer: 320 byte(s) leaked in 2 allocation(s).