965d06da1ed957c349dbdfcc7831b462b757bf85 |
|
28-Nov-2017 |
dimitry <dimitry@google.com> |
Fix logic in loading dependencies crossing namespace boundaries This change addresses multiple problems introduced by 02586a2a34e6acfccf359b94db840f422b6c0231 1. In the case of unsuccessful dlopen the failure guard is triggered for two namespaces which leads to double unload. 2. In the case where load_tasks includes libraries from 3 and more namespaces it results in incorrect linking of libraries shared between second and third/forth and so on namespaces. The root cause of these problems was recursive call to find_libraries. It does not do what it is expected to do. It does not form new load_tasks list and immediately jumps to linking local_group. Not only this skips reference counting it also will include unlinked but accessible library from third (and fourth and fifth) namespaces in invalid local group. The best case scenario here is that for 3 or more namesapces this will fail to link. The worse case scenario it will link the library incorrectly with will lead to very hard to catch bugs. This change removes recursive call and replaces it with explicit list of local_groups which should be linked. It also revisits the way we do reference counting - with this change the reference counts are updated after after libraries are successfully loaded. Also update soinfo_free to abort in case when linker tries to free same soinfo for the second time - this makes linker behavior less undefined. Test: bionic-unit-tests Bug: http://b/69787209 Change-Id: Iea25ced181a98c6503cce6e2b832c91d697342d5
|
7a34b9d57a762ca7cd6b8d6b9f9fb45c2b991da7 |
|
03-Feb-2017 |
Dimitry Ivanov <dimitry@google.com> |
Replace public library list with shared lib sonames (part 2/2) This commit updates interface of libdl.c. 1. android_init_namespaces is replaces with android_init_anonymous_namespace 2. added 2 arguments to android_create_namespace to specify linked namespace and the list of shared libraries sonames. 3. symbol lookup does not get past boundary libraries (added check and test for it). Bug: http://b/26833548 Bug: http://b/21879602 Test: bionic-unit-tests --gtest_filter=dl*:Dl* Change-Id: I32921da487a02e5bd0d2fc528904d1228394bfb9
|
a36e59bb9973aaae2e3487e0bfadd1f79814097e |
|
01-Sep-2016 |
Dimitry Ivanov <dimitry@google.com> |
Move test libraries under /data/nativetests Move libraries used in bionic-unit-tests out of system partition to /data/nativetests../bionic-loader-test-libs Bug: http://b/22182538 Test: build bionic and run bionic-unit-tests Change-Id: I170177bef782839d0b4970ae4418bf54d0a77836
|
42d5fcb9f494eb45de3b6bf759f4a18076e84728 |
|
30-Oct-2015 |
Dmitriy Ivanov <dimitry@google.com> |
Introducing linker namespaces Bug: http://b/22548808 Change-Id: Ia3af3c0a167f1d16447a3d83bb045d143319b1e1
|