[libcamera-devel] [PATCH v1] test: gstreamer: Disable gstreamer registry forks

Vedant Paranjape vedantparanjape160201 at gmail.com
Sat Aug 21 16:16:26 CEST 2021


Hello Laurent,

On Sat, 21 Aug, 2021, 19:18 Laurent Pinchart, <
laurent.pinchart at ideasonboard.com> wrote:

> Hi Vedant,
>
> Thank you for the patch.
>
> On Sat, Aug 21, 2021 at 02:22:33PM +0530, Vedant Paranjape wrote:
> > ASan needs to be loaded first before gstreamer is loaded. This was not
> > possible, so verify_asan_link_order was disabled. Better way to tackle
> > this issue was disabling forks on the gstreamer side.
> >
> > Signed-off-by: Vedant Paranjape <vedantparanjape160201 at gmail.com>
> > ---
> >  test/gstreamer/gstreamer_single_stream_test.cpp | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/test/gstreamer/gstreamer_single_stream_test.cpp
> b/test/gstreamer/gstreamer_single_stream_test.cpp
> > index 349dcfa4..7b0b7676 100644
> > --- a/test/gstreamer/gstreamer_single_stream_test.cpp
> > +++ b/test/gstreamer/gstreamer_single_stream_test.cpp
> > @@ -52,7 +52,7 @@ protected:
> >  #if defined(__SANITIZE_ADDRESS__) && !defined(__clang__) && __GNUC__ < 8
> >               return TestSkip;
> >  #endif
> > -             setenv("ASAN_OPTIONS", "verify_asan_link_order=0", 1);
> > +             gst_registry_fork_set_enabled(false);
>
> With this, we don't need to skip the test anymore even with gcc 7, as
> while the verify_asan_link_order option isn't available in gcc 7, it's
> not required anymore with gst_registry_fork_set_enabled().
>

But the test still fails due to memory leaks in Gstreamer. This only fixes
the Asan being loaded after gstreamer.

The commit message needs to be expanded, as it doesn't explain why
> gst_registry_fork_set_enabled() can replace verify_asan_link_order=0.
>

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.
If you could clarify that.

>
> >               /* Initialize GStreamer */
> >               g_autoptr(GError) errInit = NULL;
>
> --
> Regards,
>
> Laurent Pinchart


>
Regards,
*Vedant Paranjape*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20210821/2bbad8d2/attachment.htm>


More information about the libcamera-devel mailing list