Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install files properly #4

Closed
mcatanzaro opened this issue Apr 7, 2018 · 0 comments
Closed

Install files properly #4

mcatanzaro opened this issue Apr 7, 2018 · 0 comments

Comments

@mcatanzaro
Copy link
Collaborator

mcatanzaro commented Apr 7, 2018

WPEBackend-fdo installs files into hardcoded locations, like lib/ and include/.

lib/ is particularly egregious since that's almost never the right place to install libraries. It works for us in our JHBuild development environment because JHBuild doesn't use multiarch (like Debian) or lib64 (like everywhere else).

This is a companion issue to WebPlatformForEmbedded/libwpe#11

carlosgcampos added a commit that referenced this issue Nov 26, 2020
ClientBundle is created in exportable_fdo create functions but it's not
released when the wpe_view_backend_exportable_fdo struct is destroyed.

Direct leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x7fe5b8aa6647 in operator new(unsigned long) (/lib/x86_64-linux-gnu/libasan.so.6+0xab647)
    #1 0x7fe59ecd35d7 in wpe_view_backend_exportable_fdo_egl_create ../src/view-backend-exportable-fdo-egl.cpp:292
    #2 0x7fe5aa59cc3f in WebKit::AcceleratedBackingStoreWayland::AcceleratedBackingStoreWayland(WebKit::WebPageProxy&) (libwebkit2gtk-4.0.so.37+0x4315c3f)
    #3 0x7fe5aa59cd4a in WebKit::AcceleratedBackingStoreWayland::create(WebKit::WebPageProxy&) (libwebkit2gtk-4.0.so.37+0x4315d4a)
    #4 0x7fe5aa59b854 in WebKit::AcceleratedBackingStore::create(WebKit::WebPageProxy&) (libwebkit2gtk-4.0.so.37+0x4314854)
    #5 0x7fe5aa2cf711 in webkitWebViewBaseCreateWebPage(_WebKitWebViewBase*, WTF::Ref<API::PageConfiguration, WTF::RawPtrTraits<API::PageConfiguration> >&&) (libwebkit2gtk-4.0.so.37+0x4048711)
    #6 0x7fe5aa23ec58 in webkitWebViewCreatePage(_WebKitWebView*, WTF::Ref<API::PageConfiguration, WTF::RawPtrTraits<API::PageConfiguration> >&&) (libwebkit2gtk-4.0.so.37+0x3fb7c58)
    #7 0x7fe5aa22798a in webkitWebContextCreatePageForWebView(_WebKitWebContext*, _WebKitWebView*, _WebKitUserContentManager*, _WebKitWebView*, _WebKitWebsitePolicies*) (libwebkit2gtk-4.0.so.37+0x3fa098a)
    #8 0x7fe5aa252142 in webkitWebViewConstructed(_GObject*) (libwebkit2gtk-4.0.so.37+0x3fcb142)
    #9 0x7fe59fd43156 in g_object_new_internal ../gobject/gobject.c:1979

Use std::unique_ptr to create the ClientBundle and transfer the
ownership to wpe_view_backend_exportable_fdo struct that now takes both
the ClientBundle and backend as construct parameters and frees the
backend in the destructor.
aperezdc pushed a commit that referenced this issue Nov 26, 2020
ClientBundle is created in exportable_fdo create functions but it's not
released when the wpe_view_backend_exportable_fdo struct is destroyed.

Direct leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x7fe5b8aa6647 in operator new(unsigned long) (/lib/x86_64-linux-gnu/libasan.so.6+0xab647)
    #1 0x7fe59ecd35d7 in wpe_view_backend_exportable_fdo_egl_create ../src/view-backend-exportable-fdo-egl.cpp:292
    #2 0x7fe5aa59cc3f in WebKit::AcceleratedBackingStoreWayland::AcceleratedBackingStoreWayland(WebKit::WebPageProxy&) (libwebkit2gtk-4.0.so.37+0x4315c3f)
    #3 0x7fe5aa59cd4a in WebKit::AcceleratedBackingStoreWayland::create(WebKit::WebPageProxy&) (libwebkit2gtk-4.0.so.37+0x4315d4a)
    #4 0x7fe5aa59b854 in WebKit::AcceleratedBackingStore::create(WebKit::WebPageProxy&) (libwebkit2gtk-4.0.so.37+0x4314854)
    #5 0x7fe5aa2cf711 in webkitWebViewBaseCreateWebPage(_WebKitWebViewBase*, WTF::Ref<API::PageConfiguration, WTF::RawPtrTraits<API::PageConfiguration> >&&) (libwebkit2gtk-4.0.so.37+0x4048711)
    #6 0x7fe5aa23ec58 in webkitWebViewCreatePage(_WebKitWebView*, WTF::Ref<API::PageConfiguration, WTF::RawPtrTraits<API::PageConfiguration> >&&) (libwebkit2gtk-4.0.so.37+0x3fb7c58)
    #7 0x7fe5aa22798a in webkitWebContextCreatePageForWebView(_WebKitWebContext*, _WebKitWebView*, _WebKitUserContentManager*, _WebKitWebView*, _WebKitWebsitePolicies*) (libwebkit2gtk-4.0.so.37+0x3fa098a)
    #8 0x7fe5aa252142 in webkitWebViewConstructed(_GObject*) (libwebkit2gtk-4.0.so.37+0x3fcb142)
    #9 0x7fe59fd43156 in g_object_new_internal ../gobject/gobject.c:1979

Use std::unique_ptr to create the ClientBundle and transfer the
ownership to wpe_view_backend_exportable_fdo struct that now takes both
the ClientBundle and backend as construct parameters and frees the
backend in the destructor.
carlosgcampos added a commit that referenced this issue Nov 26, 2020
ClientBundle is created in exportable_fdo create functions but it's not
released when the wpe_view_backend_exportable_fdo struct is destroyed.

Direct leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x7fe5b8aa6647 in operator new(unsigned long) (/lib/x86_64-linux-gnu/libasan.so.6+0xab647)
    #1 0x7fe59ecd35d7 in wpe_view_backend_exportable_fdo_egl_create ../src/view-backend-exportable-fdo-egl.cpp:292
    #2 0x7fe5aa59cc3f in WebKit::AcceleratedBackingStoreWayland::AcceleratedBackingStoreWayland(WebKit::WebPageProxy&) (libwebkit2gtk-4.0.so.37+0x4315c3f)
    #3 0x7fe5aa59cd4a in WebKit::AcceleratedBackingStoreWayland::create(WebKit::WebPageProxy&) (libwebkit2gtk-4.0.so.37+0x4315d4a)
    #4 0x7fe5aa59b854 in WebKit::AcceleratedBackingStore::create(WebKit::WebPageProxy&) (libwebkit2gtk-4.0.so.37+0x4314854)
    #5 0x7fe5aa2cf711 in webkitWebViewBaseCreateWebPage(_WebKitWebViewBase*, WTF::Ref<API::PageConfiguration, WTF::RawPtrTraits<API::PageConfiguration> >&&) (libwebkit2gtk-4.0.so.37+0x4048711)
    #6 0x7fe5aa23ec58 in webkitWebViewCreatePage(_WebKitWebView*, WTF::Ref<API::PageConfiguration, WTF::RawPtrTraits<API::PageConfiguration> >&&) (libwebkit2gtk-4.0.so.37+0x3fb7c58)
    #7 0x7fe5aa22798a in webkitWebContextCreatePageForWebView(_WebKitWebContext*, _WebKitWebView*, _WebKitUserContentManager*, _WebKitWebView*, _WebKitWebsitePolicies*) (libwebkit2gtk-4.0.so.37+0x3fa098a)
    #8 0x7fe5aa252142 in webkitWebViewConstructed(_GObject*) (libwebkit2gtk-4.0.so.37+0x3fcb142)
    #9 0x7fe59fd43156 in g_object_new_internal ../gobject/gobject.c:1979

Use std::unique_ptr to create the ClientBundle and transfer the
ownership to wpe_view_backend_exportable_fdo struct that now takes both
the ClientBundle and backend as construct parameters and frees the
backend in the destructor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant