Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36127e6b authored by Anton Ivanov's avatar Anton Ivanov
Browse files

Explicitly include libgui as a shared library in libgui_test.

Currently, libgui is compiled statically into the test binary by virtue
of `src` attribute of `libgui-defaults`, and also loaded as a shared
library by transitive dependency.  This leads to double-delete and
use-after-delete issues in the test on global mutexes defined by
android::Singleton<>.

Flag: EXEMPT refactor
Test: presubmit
Bug: 399711310
Change-Id: I31408237f345632bfd8f2d2ac880dfac53e75ae4
parent 851a6d25
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -295,7 +295,6 @@ filegroup {
cc_defaults {
    name: "libgui-defaults",
    defaults: ["libgui_bufferqueue-defaults"],
    srcs: [":libgui-sources"],
    static_libs: [
        "libgui_aidl_static",
        "libgui_window_info_static",
@@ -319,6 +318,10 @@ cc_library_shared {
        "libgui-defaults",
    ],

    srcs: [
        ":libgui-sources",
    ],

    export_static_lib_headers: [
        "libgui_aidl_static",
        "libgui_window_info_static",
+1 −0
Original line number Diff line number Diff line
@@ -100,6 +100,7 @@ cc_test {
        "android.hardware.configstore-utils",
        "libSurfaceFlingerProp",
        "libGLESv1_CM",
        "libgui",
        "libgui_test_server_aidl-cpp",
        "libinput",
        "libnativedisplay",