diff options
author | Christopher Ferris <cferris@google.com> | 2015-06-17 15:03:20 -0700 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2015-06-17 15:30:29 -0700 |
commit | ad81791641071e8daab0d27e49731975c5efcba6 (patch) | |
tree | a96da0d30b811a4b4fb869dfc773cb808d63c704 /cmds/app_process | |
parent | 90b3b93de460ccd1fc1116154f5d61bd2bc93d25 (diff) | |
download | frameworks_base-ad81791641071e8daab0d27e49731975c5efcba6.zip frameworks_base-ad81791641071e8daab0d27e49731975c5efcba6.tar.gz frameworks_base-ad81791641071e8daab0d27e49731975c5efcba6.tar.bz2 |
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
Diffstat (limited to 'cmds/app_process')
-rw-r--r-- | cmds/app_process/Android.mk | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/cmds/app_process/Android.mk b/cmds/app_process/Android.mk index 3599695..7ce0846 100644 --- a/cmds/app_process/Android.mk +++ b/cmds/app_process/Android.mk @@ -1,5 +1,12 @@ 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 |