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

Commit ad817916 authored by Christopher Ferris's avatar Christopher Ferris
Browse files

Add libwilhelm to app_process.

If an app exposes new/delete from a shared library, the libwilhelm
shared library can wind up using the new from the app shared library,
and the delete from libc++. It is completely legal for the app to
export new/delete in this way, so in order to avoid this situation,
preload libwilhelm in the zygote. This forces libwilhelm to always
resolve the new/delete from libc++.

This library cannot be added to android_runtime since libwilhelm
has a shared library which depends on android_runtime.

Bug: 21032018
Change-Id: Id89c196df62d98d62855a1421f397b75a7e990a9
parent 90b3b93d
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
LOCAL_PATH:= $(call my-dir)

# This is a list of libraries that need to be included in order to avoid
# bad apps. This prevents a library from having a mismatch when resolving
# new/delete from an app shared library.
# See b/21032018 for more details.
app_process_common_shared_libs := \
    libwilhelm \

include $(CLEAR_VARS)

LOCAL_SRC_FILES:= \
@@ -13,7 +20,8 @@ LOCAL_SHARED_LIBRARIES := \
    libutils \
    liblog \
    libbinder \
    libandroid_runtime
    libandroid_runtime \
    $(app_process_common_shared_libs) \

LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain

@@ -44,7 +52,8 @@ LOCAL_SHARED_LIBRARIES := \
    libutils \
    liblog \
    libbinder \
    libandroid_runtime
    libandroid_runtime \
    $(app_process_common_shared_libs) \

LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain