<div dir="auto"><div>Hello Laurent,<br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 21 Aug, 2021, 19:18 Laurent Pinchart, <<a href="mailto:laurent.pinchart@ideasonboard.com">laurent.pinchart@ideasonboard.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Vedant,<br>
<br>
Thank you for the patch.<br>
<br>
On Sat, Aug 21, 2021 at 02:22:33PM +0530, Vedant Paranjape wrote:<br>
> ASan needs to be loaded first before gstreamer is loaded. This was not<br>
> possible, so verify_asan_link_order was disabled. Better way to tackle<br>
> this issue was disabling forks on the gstreamer side.<br>
> <br>
> Signed-off-by: Vedant Paranjape <<a href="mailto:vedantparanjape160201@gmail.com" target="_blank" rel="noreferrer">vedantparanjape160201@gmail.com</a>><br>
> ---<br>
>  test/gstreamer/gstreamer_single_stream_test.cpp | 2 +-<br>
>  1 file changed, 1 insertion(+), 1 deletion(-)<br>
> <br>
> diff --git a/test/gstreamer/gstreamer_single_stream_test.cpp b/test/gstreamer/gstreamer_single_stream_test.cpp<br>
> index 349dcfa4..7b0b7676 100644<br>
> --- a/test/gstreamer/gstreamer_single_stream_test.cpp<br>
> +++ b/test/gstreamer/gstreamer_single_stream_test.cpp<br>
> @@ -52,7 +52,7 @@ protected:<br>
>  #if defined(__SANITIZE_ADDRESS__) && !defined(__clang__) && __GNUC__ < 8<br>
>               return TestSkip;<br>
>  #endif<br>
> -             setenv("ASAN_OPTIONS", "verify_asan_link_order=0", 1);<br>
> +             gst_registry_fork_set_enabled(false);<br>
<br>
With this, we don't need to skip the test anymore even with gcc 7, as<br>
while the verify_asan_link_order option isn't available in gcc 7, it's<br>
not required anymore with gst_registry_fork_set_enabled().<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">But the test still fails due to memory leaks in Gstreamer. This only fixes the Asan being loaded after gstreamer.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The commit message needs to be expanded, as it doesn't explain why<br>
gst_registry_fork_set_enabled() can replace verify_asan_link_order=0.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I understand why we need to use verify asan link, but I don't understand why disabling the child helper process while building the registry makes sure that Asan is the first DLL to load.</div><div dir="auto">If you could clarify that.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
>  <br>
>               /* Initialize GStreamer */<br>
>               g_autoptr(GError) errInit = NULL;<br>
<br>
-- <br>
Regards,<br>
<br>
Laurent Pinchart</blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Regards,</div><div dir="auto"><b><i>Vedant Paranjape</i></b></div><div dir="auto"></div></div>