gl/glx: gst_gl_context_glx_activate causes leaks
From !5727 (closed):
Adding passtrough support to glcolorconvert
causes leaks on glx. There are various tests blocklisted for valgrind already mentioning reasons like "driver leaks" but not linking an issue, so I assume this is caused by the MR and figured it would make sense to create this issue, possibly allowing to remove a bunch of valgrind blocklist entries once fixed.
valgrind summary
Running suite(s): autovideoconvert 0%: Checks: 1, Failures: 0, Errors: 1 ../subprojects/gst-plugins-bad/tests/check/elements/autovideoconvert.c:89:E:general:test_autovideoconvert_videoconvert:0: (after this point) Early exit with return value 20 Check suite autovideoconvert ran in 13.314s (tests failed: 1)
Duration: 17.789213180541992
test_autovideoconvert_videoconvert.valgrind:
==17399== Memcheck, a memory error detector
==17399== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==17399== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==17399== Command: /builds/rmader/gstreamer/build/subprojects/gst-plugins-bad/tests/check/elements_autovideoconvert
==17399== Parent PID: 14558
==17399==
==17501==
==17501== HEAP SUMMARY:
==17501== in use at exit: 1,279,683 bytes in 8,547 blocks
==17501== total heap usage: 93,048 allocs, 84,501 frees, 73,210,986 bytes allocated
==17501==
==17501== 5,355 bytes in 255 blocks are definitely lost in loss record 4,227 of 4,250
==17501== at 0x484286F: malloc (vg_replace_malloc.c:381)
==17501== by 0x4C0114E: strdup (strdup.c:42)
==17501== by 0x9B73781: ???
==17501== by 0x9B73524: ???
==17501== by 0x89DFE91: FixupDispatchTable (GLdispatch.c:257)
==17501== by 0x89E0C1F: UnknownInlinedFun (GLdispatch.c:587)
==17501== by 0x89E0C1F: __glDispatchMakeCurrent (GLdispatch.c:555)
==17501== by 0x8902CD1: InternalMakeCurrentDispatch (libglx.c:921)
==17501== by 0x890711A: CommonMakeCurrent (libglx.c:1074)
==17501== by 0x865883A: gst_gl_context_glx_activate (gstglcontext_glx.c:878)
==17501== by 0x86230CC: gst_gl_context_activate (gstglcontext.c:777)
==17501== by 0x862513C: gst_gl_context_create_thread (gstglcontext.c:1335)
==17501== by 0x4A5DC41: g_thread_proxy (gthread.c:826)
==17501== by 0x4F532A4: start_thread (pthread_create.c:481)
==17501== by 0x4C71322: clone (clone.S:95)
==17501==
{
<insert_a_suppression_name_here>
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
fun:strdup
obj:*
obj:*
fun:FixupDispatchTable
fun:UnknownInlinedFun
fun:__glDispatchMakeCurrent
fun:InternalMakeCurrentDispatch
fun:CommonMakeCurrent
fun:gst_gl_context_glx_activate
fun:gst_gl_context_activate
fun:gst_gl_context_create_thread
fun:g_thread_proxy
fun:start_thread
fun:clone
}
==17501== LEAK SUMMARY:
==17501== definitely lost: 5,355 bytes in 255 blocks
==17501== indirectly lost: 0 bytes in 0 blocks
==17501== possibly lost: 0 bytes in 0 blocks
==17501== still reachable: 264,722 bytes in 2,714 blocks
==17501== suppressed: 989,782 bytes in 5,403 blocks
==17501== Reachable blocks (those to which a pointer was found) are not shown.
==17501== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==17501==
==17501== For lists of detected and suppressed errors, rerun with: -s
==17501== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2)
==17399==
==17399== HEAP SUMMARY:
==17399== in use at exit: 655,371 bytes in 1,595 blocks
==17399== total heap usage: 59,723 allocs, 58,128 frees, 35,552,145 bytes allocated
==17399==
==17399== LEAK SUMMARY:
==17399== definitely lost: 0 bytes in 0 blocks
==17399== indirectly lost: 0 bytes in 0 blocks
==17399== possibly lost: 0 bytes in 0 blocks
==17399== still reachable: 96 bytes in 2 blocks
==17399== suppressed: 648,459 bytes in 1,526 blocks
==17399== Reachable blocks (those to which a pointer was found) are not shown.
==17399== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==17399==
==17399== For lists of detected and suppressed errors, rerun with: -s
==17399== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 1 from 1)
</details>