summaryrefslogtreecommitdiff
path: root/libnativebridge
AgeCommit message (Collapse)Author
2025-03-20Move more path logic for tests to testing.cc, so it can be used without Martin Stjernholm
depending on CommonArtTest. Preparation to fix the libart-gtest dependency in art_standalone_libartpalette_tests. Due to a new #include, this necessitated fixing a bunch of `testing` namespace references that could become ambigious wrt `art::testing`. Test: m generate-boot-image Test: art/tools/buildbot-build.sh Bug: 404306250 Change-Id: Iafb3d73148125775c9c5ddbcbaef39dc61859118
2025-02-05nativebridge: Add isNativeBridgeFunctionPointer method dimitry
This method lets native bridge report if particular pointer is in the region of code executable by native bridge implementation. Bug: 393035780 Test: atest art/libnativebridge/tests Change-Id: Icaec80cb7efae5b918aed0a98216cbfaeaba330d
2024-09-11Remove remnants of init_anonymous_namespace in libnativebridge and Martin Stjernholm
in tests. It ceased to be used in https://r.android.com/1070435. #codehealth Test: atest CtsJniTestCases Test: atest art/libnativeloader Test: atest art/libnativebridge/tests Bug: 130388701 Bug: 122710865 Change-Id: Ie8fcde3b86b4913566ebb5ea3f1a4bc9b9f96316
2024-09-10Restrict exported symbols from libnative{loader,bridge} lazy libs. Martin Stjernholm
The shims in the lazy libs bypass the stubs and hence the vetted exported APIs in the .map.txt files. To avoid inadvertently giving external access to internal APIs that way, let's apply the .map.txt files as version scripts to the lazy libs instead, so that any functions added there just don't become available to external code unless the .map.txt files get updated. This hack doesn't work if the lazy libs are linked statically, so restrict them to be shared libs (although ideally they should be static instead to avoid the shared lib overheads). Also drop the shims for the two functions added in https://r.android.com/2689969 and https://r.android.com/3022103, because they're only used internally in ART and don't go through the shims. Test: atest libnativebridge-tests art_libnativebridge_cts_tests \ libnativebridge-lazy-tests libnativeloader_test \ art_libnativeloader_cts_test libnativeloader_lazy_test Bug: 124250621 Change-Id: I1e1eba3f656830f51b792ce672276f37b3f0d865
2024-08-13Simplify test configs by disabling append-bitness and pushing the whole Martin Stjernholm
test directory instead. Using append-bitness with FilePusher apparently disables pushing of the whole directory. If we remove it and push the test directory instead, we won't need to append bitness since it's added implicitly (and the test directory also has arch subdirectories). Without append-bitness we can also switch to PushFilePreparer, because that flag is the only difference between them. By pushing the whole test directory it's possible to clean up several cases where it was necessary to push other files with the tests. Test configs that invoke generate-boot-image on the device aren't so easy to fix this way, because we must expand the right path to the binary inside the test directory. Hence they're kept as-is for now. #codehealth Test: atest -a art_libnativebridge_cts_tests art_standalone_artd_tests \ art_standalone_cmdline_tests art_standalone_compiler_tests \ art_standalone_dex2oat_cts_tests art_standalone_dex2oat_tests \ art_standalone_dexdump_tests art_standalone_dexlist_tests \ art_standalone_dexopt_chroot_setup_tests \ art_standalone_dexoptanalyzer_tests art_standalone_dexpreopt_tests \ art_standalone_disassembler_tests art_standalone_libartbase_tests \ art_standalone_libartpalette_tests \ art_standalone_libartservice_tests art_standalone_libarttools_tests \ art_standalone_libdexfile_external_tests \ art_standalone_libdexfile_support_tests \ art_standalone_libdexfile_tests art_standalone_libprofile_tests \ art_standalone_oatdump_tests art_standalone_odrefresh_tests \ art_standalone_profman_tests art_standalone_runtime_tests \ art_standalone_sigchain_tests libnativeloader_lazy_test \ libnativeloader_test libnativebridge-tests Change-Id: I7c524a856821a5ee2b53d53e84793bf6527b970b
2024-08-12Link libraries with unstable ABIs statically into libnativebridge-tests. Martin Stjernholm
It incorrectly used art_test_internal_library_defaults, which requires setting NATIVELOADER_DEFAULT_NAMESPACE_LIBS to work. It still links several test libraries dynamically, but that works fine since they're pushed with the test. Add a test config to enable pushing the test libraries. It's the same as art-gtests-target-standalone-template.xml, except `append-bitness` isn't passed to the file pusher, which apparently disables pushing the whole test directory. Test: atest libnativebridge-tests Test: readelf -d out/target/product/vsoc_x86_64/testcases/libnativebridge-tests/x86_64/libnativebridge-tests64 -> Check that no unstable libraries like libc++.so are linked dynamically. Bug: 357950167 Change-Id: I406d030312889c668ce0b7489e17b99c06070698
2024-07-09Style changes in `libnativebridge-tests`. Roland Levillain
This is a follow-up to https://android-review.git.corp.google.com/c/platform/art/+/3080063. Test: atest --host libnativebridge-tests Test: atest libnativebridge-tests Bug: 189484095 Flag: TEST_ONLY Change-Id: I8d30747d8713e9c1d29e08758df7c7d9d68e2846
2024-06-23Ensure ART gtests are both or neither in CTS and MCTS. Roland Levillain
For now, there is no good reason to have ART gtests have a different test suite membership w.r.t. CTS and MCTS. This change adds the following test modules to ART MCTS: * `art_standalone_libdexfile_external_tests` * `odsign_e2e_tests` Also update some comments about CTS and MCTS in Blueprint files. Flag: TEST_ONLY Test: Run `m mcts-art` and check the content of `android-mcts-art.zip` Bug: 147819342 Change-Id: I6d2cb298006d1eb1a56d7c836becd2c6f3890649
2024-05-16Limit `test_for` to ART tests that explicitly link internal libraries. Martin Stjernholm
`test_for` bypasses the stubs when tests are built against the shared libs, so it should only be used for tests that intentionally link dynamically to the ART implementation interfaces. Test: mmm art/ Test: gtests in ART chroot Test: art/libnativebridge/tests/runtests.sh Bug: 247108425 Change-Id: I207000d5c9731209aa497e284bbc5106f8ab65d8
2024-05-15Use isolated: true instead of test_per_src: true in libnativebridge_tests Colin Cross
libnativebridge_tests uses test_per_src: true to avoid running multiple tests in the same process. gtest_isolated uses separate processes for each test, but without the various incompatibilities caused by test_per_src. Switch to isolated: true instead. Create a temporary directory in the constructor of the shared NativeBridgeTest base class instead and put the code_cache directory inside it to keep the tests from trying to modify the current directory. Also add the tests to TEST_MAPPING and remove the preupload check. Bug: 189484095 Test: atest --host libnativebridge_tests Test: atest libnativebridge_tests Flag: TEST_ONLY Change-Id: Iea522c1895f1f5996b10e545c44d6b00bda1ee3d
2024-04-23Set test ownerships for ART. Martin Stjernholm
Test: presubmits Bug: 333696887 Change-Id: Ieb6992ecb0a2489697ffa176dabc25626050cd48
2024-04-09Add a README for native bridge and libnativebridge. Martin Stjernholm
Also add an old but still useful flow diagram describing zygote and app load and how it integrates with native bridge. Test: n/a - doc change only Bug: 330519779 Change-Id: I1075d20eb82152446206cd1358637eb851271bbb
2024-04-05Add getTrampolineForFunctionPointer method to native bridge dimitry
Add a function to native bridge that generates trampolines for guest pointers and call it for native-bridged namespaces. Bug: http://b/330367443 Test: art/libnativebridge/tests/runtests.sh --skip-target Test: ./android-cts/tools/cts-tradefed run cts -m CtsJniTestCases Change-Id: I02cab5ea6c87cb4d5065033a4b6793eb57fe0f52
2024-04-05Consolidate OWNERS in libnativebridge and libnativeloader. Martin Stjernholm
Ensure ART team has visibility into changes that go into the module. Remove OWNERS files in these subdirectories to make art/OWNERS take effect instead. Test: n/a Bug: 327407752 Change-Id: I5122c2ad34b371c4a5b901efcc9949ba24faf404
2024-03-18Revert "libnativebridge_test: link non-public libs statically" and fix Martin Stjernholm
the CTS test to only call exported APIs. Reverts commit 7f5b3d89f21edd958ddb9d7bd01e03c77bd5425a. CTS tests need to link the libraries they test dynamically, and this test only tests exported stable APIs. The standalone CTS test config template includes NativeBridgeModuleController, so the test won't run in a translated environment (which has no proxy for this library and hence caused the error that prompted commit 7f5b3d89f21edd958ddb9d7bd01e03c77bd5425a). The test also used to test some non-exported APIs, which it shouldn't do in CTS. This changes it to use art_standalone_test_defaults, which doesn't have the test_for attributes that made it bypass the stub. Also reuse the trivial API-only tests for libnativebridge_lazy, and give them a more apt name for the new use. Test: atest art_libnativebridge_cts_tests \ libnativebridge-lazy-tests Test: art/libnativebridge/tests/runtests.sh Bug: 327407752 Change-Id: Ib56148f1a651a9ffa3045bc401cc625e6f42416b
2024-01-03Update `OWNERS` files under `art`. Roland Levillain
Test: n/a Change-Id: Ie62b1b6da0c52277642c9a4af6d8d208fab2e26a
2023-12-21Add mcts tag to MainlineCTS ART test modules. Tongbo Liu
Bug: 316436957 Change-Id: I7db6cf4f06ba77daf8f2e3be532a9bbda7f14667
2023-10-02Isolate ValidNameNativeBridge_test. Krzysztof KosiƄski
The test depends on static state that cannot be reset and is modified by other tests. Upstream googletest sorts the tests before running them, so it's no longer possible to control the order of tests via the order of the srcs attribute. Bug: 302771018 Test: art/libnativebridge/tests/runtests.sh Change-Id: If6b96049f6ed7a276ca1dcd0d7a70966d7ffecbf
2023-08-08nativebridge: Add getTrampoline2 function to pass JNICallType dimitry
NativeBridge needs to know if JNI call is @CriticalNative, starting with v7 getTrampoline2 is used in place of getTrampoline. Bug: https://issuetracker.google.com/288392666 Test: art/libnativebridge/tests/runtests.sh --skip-target Change-Id: I60a2fd6ab2fb9d19dda7bbdcbe09144797bd1d49
2023-08-07libnativebridge: Add levarum@ to owners dimitry
Test: art/libnativebridge/tests/runtests.sh --skip-target Change-Id: I4f74a5754c33851717255fb5498cc6aae8683d4a
2023-04-28libnativebridge_test: link non-public libs statically Lev Rumyantsev
Non-public NDK libs are not supposed to be tested in CTS. Specifically native-bridged execution (e.g. arm on x86) doesn't support this. Test: cts-tradefed run cts -m art_libnativebridge_cts_tests (arm on x86) Test: art/libnativebridge/tests/runtests.sh Bug: b/268440713 Change-Id: I991688e44a5fa5083e26372e408a9e3343e78b18
2023-03-16Make art modules apex_available to test_broken_com.android.art Cole Faust
libart-broken needs to compile against the source of its dependencies, not stubs. The stubs/source logic is complicated, but one of the ways it can be affected is that if both modules have identical apex_available lists, they will be allowed to depend on the source of each other. libart-broken needs to be apex_available to test_broken_com.android.art, so test_broken_com.android.art needs to be added to libdexfile as well. This change then propagates virally though most of the art modules. This is needed now because we're making a change to allow building the non-apex variants of apex dependencies. The apex variant of libart-broken did not have this issue because the stubs/source rules are different for apex variants. Bug: 254205429 Test: cd art && mm with aosp/2462194 Test: art/libnativebridge/tests/runtests.sh --skip-target Change-Id: Ia3517b70808d64ed2b33d68e2280b514bdfef6b6
2023-02-03Fix android-cloexec-fopen clang-tidy issues Stefano Cianciulli
Bug: 264654008 Test: m tidy-art Test: art/libnativebridge/tests/runtests.sh Change-Id: I8c7145b11ec79ff4c5621daaa004c28a781b18d0
2022-12-01Add bug component to OWNERS files, to follow go/xts-owners-policy. Martin Stjernholm
Also remove inactive contributor dimitry@ from libnativeloader and put myself first as the primary contact for libnativeloader and libnativebridge. Test: presubmits Bug: 261015546 Bug: 261015469 Change-Id: I6f68584ffbb71bc2d5260ced766b2da97a51b823
2022-10-01Annotate symbols correctly Jiyong Park
Currently, tagging a symbol with #apex (# systemapi or # llndk) is not required when the symbol is in a non-NDK library. However, this is considered dangerous because such a symbol will automatically be promoted to NDK APIs when the library is promoted to an NDK library. When that happens, the native API council won't be able to notice the promotion because promoting a non-NDK library into an NDK library doesn't require an update of the map.txt file, but Android.bp only. To prevent that, we should mandate those tags for Mainline APIs regardless of whether the library the API belongs to is an NDK library or not. Upcoming changes in build/soong will enforce this. This change is to prepare for the enforcement. Note that this is a build-time only change. There's no behavior change at runtime. Bug: 184712170 Test: m Test: art/libnativebridge/tests/runtests.sh Change-Id: Id62d9ba60c7611487638102c46d4bc655a81d82e
2022-08-06Disable pre-submit host unit-testing for `libnativebridge-tests`. Roland Levillain
Test module `libnativebridge-tests` is not compatible with TradeFed (because of its use of the `test_per_src` feature) and is meant to be executed with the `tests/runtests.sh` script instead. Test: Execute `m host-unit-tests` and check that the generated `host-unit-tests.zip` test suite does not contain any `libnativebridge-tests` test case. Test: art/libnativebridge/tests/runtests.sh Bug: 241124414 Change-Id: Id10e844adf9f2ef3ca24082f0fc501b5e911481b
2022-06-20Fix modernize-use-using clang-tidy issues Stefano Cianciulli
All the // NOLINT comments introduced in this CL were meant to disable only the modernize-use-using checks, but changing the comment to be // NOLINT(modernize-use-using) as explained in https://clang.llvm.org/extra/clang-tidy/#suppressing-undesired-diagnostics will make cpplint throw an error, as also cpplint uses the // NOLINT(...) notation to suppress unwanted warnings. Test: m tidy-art Test: art/libnativebridge/tests/runtests.sh Bug: 213953102 Change-Id: I9a992e0f0ecd06f7e64fd0bbf473bec4582370f6
2022-06-13Use compile_multilib: "both" with "32"/"64" suffixes by default for ART Martin Stjernholm
native standalone tests. It cannot be used for shared testing libraries since the suffixes aren't picked up by DT_NEEDED or dlopen calls. They need to continue to be installed into different directories, just like before. This relands https://r.android.com/2119389 with a fix for https://ci.chromium.org/ui/p/art/builders/ci/host-x86_64-cms/7684/overview and b/235614072: Only apply the suffixes to standalone tests, to leave test .so files and test binaries in the testing APEX alone. Test: gtests and run tests on host and in the buildbot-build.sh chroot Test: art/libnativebridge/tests/runtests.sh Test: atest art_standalone_dex2oat_tests Test: art/build/apex/runtests.sh Bug: 233550842 Change-Id: I2b7d7327fc846b51ab91159959b2dd4bc2f503ca
2022-06-10Revert "Use compile_multilib: "both" with "32"/"64" suffixes by default for ART" Nicolas Geoffray
This reverts commit e631de122b065b014927c08df45258dffca27211. Bug: 233550842 Reason for revert: Fails nativebridge test: #################### #################### stderr diffs --- expected-stderr.txt 2008-01-01 00:00:00.000000000 -0800 +++ test-stderr.txt 2022-06-10 07:15:02.074448940 -0700 @@ -0,0 +1,5 @@ +Exception in thread "main" java.lang.UnsatisfiedLinkError: /b/s/w/ir/x/t/test-art-js9t0vr2/tmpf1x6axa7/libarttestd.so: file too short + at java.lang.Runtime.loadLibrary0(Runtime.java:1077) + at java.lang.Runtime.loadLibrary0(Runtime.java:998) + at java.lang.System.loadLibrary(System.java:1661) + at NativeBridgeMain.main(NativeBridgeMain.java:211) #################### 115-native-bridge files deleted from host ---------- test-art-host-run-test-debug-prebuild-optimizing-no-relocate-ntrace-cms-checkjni-picimage-ndebuggable-no-jvmti-cdex-fast-115-native-bridge64 Change-Id: Ib5182fc50dc94d34f314297d0bcc0fa44cd04f61
2022-06-10Use compile_multilib: "both" with "32"/"64" suffixes by default for ART Martin Stjernholm
native tests. It cannot be used for shared testing libraries since the suffixes aren't picked up by DT_NEEDED or dlopen calls. They need to continue to be installed into different directories, just like before. Test: gtests and run tests in the buildbot-build.sh chroot Test: art/libnativebridge/tests/runtests.sh Test: atest art_standalone_dex2oat_tests Bug: 233550842 Change-Id: Idd576f9de34ab63d70e63b8701373767f0bd78ae
2022-03-02Add `art_libnativebridge_cts_tests` to ART's `TEST_MAPPING` and ART MTS. Roland Levillain
In ART MTS, add this test module to shard 00 (along with other ART gtests). Output of `art/test/utils/regen-test-files`: $ art/test/utils/regen-test-files Generated Blueprint files for 657 ART run-tests out of 950 (69%). Generated TEST_MAPPING entries for 404 ART run-tests out of 950 (42%): 404 ART run-tests (100%) in `mainline-presubmit` test group. 20 ART gtests (95%) in `mainline-presubmit` test group. 404 ART run-tests (100%) in `presubmit` test group. 21 ART gtests (100%) in `presubmit` test group. Test: atest --test-mapping art:presubmit Test: m mts && mts-tradefed run commandAndExit mts-art Test: m mts && mts-tradefed run commandAndExit mts-art-shard-00 Test: m mts \ && mts-tradefed run commandAndExit mts-art \ --module art_libnativebridge_cts_tests Test: art/libnativebridge/tests/runtests.sh Bug: 143943613 Bug: 167385698 Change-Id: I3fe63bcf4f40c80f30a11636e31f63bda0651d17
2022-02-09Add libnativebridge test to CTS for API coverage. Martin Stjernholm
It so far only tests a subset of the API, due to problems with the test setup in tradefed (b/189484095). Also fix bitrot in runtests.sh so that the host tests find their DSO dependencies. Test: m cts cts-tradefed cts-tradefed run commandAndExit cts \ --module art_libnativebridge_cts_tests Test: atest art_libnativebridge_cts_tests Test: art/libnativebridge/tests/runtests.sh Bug: 208431683 Change-Id: I359b12bb79e104e0179e8cbf62f91b3e700d9d6c
2021-11-09Inherit art_defaults in cc_library_headers as well. Martin Stjernholm
To take art_defaults closer to a true global defaults used by everything in the ART module. It has mostly compiler flags which aren't applicable for header modules, but it may have other things as well, notably min_sdk_version. #codehealth Test: Run-tests, gtests, libcore tests and libjdwp tests for host and device on master-art Bug: 204364566 Change-Id: Iba53785a992894fe7e8209a520e7ad9ec32636a2
2021-06-09Avoid internal APEX stubs in libnative{bridge,loader} and clean up Martin Stjernholm
exported symbols. The APEX stubs don't have any practical effect on the lazy loading library wrappers. Add notes about that and update the function wrappers to keep them in sync. Also add tests for the lazy libraries. That necessitated some reshuffling in libnativeloader tests to reuse the mocks. Test: art/libnativebridge/tests/runtests.sh Test: atest libnativebridge-lazy-tests Test: atest libnativeloader_test libnativeloader_lazy_test Bug: 122710865 Change-Id: I7e291f2e84d8e35731dfb1114c9b19978ff87969
2021-06-03Fold the C API tests into the regular libnative{bridge,loader} tests. Martin Stjernholm
They only need to be compiled. This way we avoid separate tests that need gtest:false and that atest doesn't handle well (although there are other reasons it doesn't handle libnativebridge-tests). Test: art/libnativebridge/tests/runtests.sh atest libnativeloader_test with and without a planted syntax error in the .c files Bug: 122710865 Change-Id: I3225bdb7c2dd268c2cf9353b7ce89819e6d396a5
2021-06-03Fix bitrot in the libnativebridge tests. Martin Stjernholm
- Bitrot 1: NativeBridge2Signal_test stopped working when version 3 was added in https://r.android.com/234059. - Bitrot 2: The code path that PreInitializeNativeBridgeFail1_test tested was removed completely when missing app data directory was allowed in https://r.android.com/1208629, so delete the test. - Use cc_test_library for the dynamic test libs so they are installed in the test directory rather than in system/lib(64). - Use test_per_src since native_bridge.cc doesn't support reloading the native bridge implementation lib after unloading. - Add a custom script to run the tests and a preupload check that the script is run. (Configuring atest for these tests still TBD in b/189484095 - test_per_src is a complication.) Test: art/libnativebridge/tests/runtests.sh Bug: 122710865 Bug: 189484095 Change-Id: Ib2b387e1d858127ca4bb44c548a5105ea8b838d8
2021-05-10Avoid loading external libraries from ARTs internal linker namespace Martin Stjernholm
(reland). dlopen() calls in ART will use its own linker namespace (com_android_art). That's appropriate for internal libraries in the APEX, but not when ART loads libraries on behalf of external requests. In those cases we should instead use android_dlopen_ext to load them from the system namespace, i.e. the one that searches /system/lib(64). The linker config has been using allow_all_shared_libs, so any loads from com_android_art fall back to the system namespace, and hence dlopen() usually works regardless which namespace it ought to use. However we want to drop allow_all_shared_libs, so we need to figure out which dlopen's should use which namespace: 1. Several ART libraries are loaded on-demand, e.g. libart-compiler and libart-disassembler. There are also those going through the runtime plugin system, like libperfetto_hprofd and heapprofd_client_api. All these are internal or at least statically known (so we can provide links for them in the linker config), and should continue to use dlopen from the ART namespace. 2. libnativeloader loads the preloadable public libraries from system/etc/public.libraries.txt, and should use the system namespace for that. 3. libnativebridge loads the native bridge implementation specified through the command line (or ultimately the system property ro.dalvik.vm.native.bridge). It's not part of the ART APEX and not known statically, so the system namespace should be used. 4. libnativeloader also loads JNI libraries from classloader namespaces, but has a fallback if no such namespace can be found based on caller location. Fall back to the system namespace to handle libraries loaded during the preload phase in the zygote. 5. JVMTI agents are loaded by dalvik.system.VMDebug.attachAgent(). Treat these too as external libraries - they are loaded in a way similar to JNI libraries through OpenNativeLibrary in libnativeloader, so are covered by #4. They are normally loaded by apps with a classloader, but a special case is adbconnection which loads libjdwp.so in the ART APEX without one and hence falls back to the system namespace. We therefore need to create a link for it (https://r.android.com/1690889, https://r.android.com/1690795). All cases #2-#5 are covered by libnativeloader and libnativebridge. Introduce OpenSystemLibrary, and since libnativeloader depends on libnativebridge, put it in the latter to be usable from both. It's only an internal dependency not exposed in the APEX stubs. (Another possibility could be to put it in the generic toolbox lib libartbase, but it's split into -d and non-d variants, and we don't want to split libnative{loader,bridge} that way.) Since libnativeloader_test no longer needs to mock dlopen we can simplify it to a more regular test that loads the tested libs dynamically. This relands https://r.android.com/1673312 without setting ANDROID_ADDITIONAL_PUBLIC_LIBRARIES in run-test-jar, because that made libnativeloader try to preload internal libraries from the system namespace. Test: mmm art Test: atest art/libnativeloader Test: atest CtsJniTestCases Test: Cuttlefish app compat test that uses NDK translation Test: Manual tests with Android Studio TI agents (http://g/art-module-team/7Jy3Tg7LCh0) Test: art/test/testrunner/testrunner.py --target --64 --optimizing in chroot on cuttlefish Bug: 130340935 Change-Id: I7fb32faacc1c214402b58125d8190e97bbbcfad2
2021-05-09Revert "Avoid loading external libraries from ARTs internal linker namespace." Calin Juravle
This reverts commit 582448f29f2f2529202bf868d00ba5d3d3776bb6. Reason for revert: breaks tests Change-Id: I2e0b2a28d4644b314887673d4aef4f1094aea289
2021-05-07Avoid loading external libraries from ARTs internal linker namespace. Martin Stjernholm
dlopen() calls in ART will use its own linker namespace (com_android_art). That's appropriate for internal libraries in the APEX, but not when ART loads libraries on behalf of external requests. In those cases we should instead use android_dlopen_ext to load them from the system namespace, i.e. the one that searches /system/lib(64). The linker config has been using allow_all_shared_libs, so any loads from com_android_art fall back to the system namespace, and hence dlopen() usually works regardless which namespace it ought to use. However we want to drop allow_all_shared_libs, so we need to figure out which dlopen's should use which namespace: 1. Several ART libraries are loaded on-demand, e.g. libart-compiler and libart-disassembler. There are also those going through the runtime plugin system, like libperfetto_hprofd and heapprofd_client_api. All these are internal or at least statically known (so we can provide links for them in the linker config), and should continue to use dlopen from the ART namespace. 2. libnativeloader loads the preloadable public libraries from system/etc/public.libraries.txt, and should use the system namespace for that. 3. libnativebridge loads the native bridge implementation specified through the command line (or ultimately the system property ro.dalvik.vm.native.bridge). It's not part of the ART APEX and not known statically, so the system namespace should be used. 4. libnativeloader also loads JNI libraries from classloader namespaces, but has a fallback if no such namespace can be found based on caller location. Fall back to the system namespace to handle libraries loaded during the preload phase in the zygote. 5. JVMTI agents are loaded by dalvik.system.VMDebug.attachAgent(). Treat these too as external libraries - they are loaded in a way similar to JNI libraries through OpenNativeLibrary in libnativeloader, so are covered by #4. They are normally loaded by apps with a classloader, but a special case is adbconnection which loads libjdwp.so in the ART APEX without one and hence falls back to the system namespace. We therefore need to create a link for it (https://r.android.com/1690889, https://r.android.com/1690795). All cases #2-#5 are covered by libnativeloader and libnativebridge. Introduce OpenSystemLibrary, and since libnativeloader depends on libnativebridge, put it in the latter to be usable from both. It's only an internal dependency not exposed in the APEX stubs. (Another possibility could be to put it in the generic toolbox lib libartbase, but it's split into -d and non-d variants, and we don't want to split libnative{loader,bridge} that way.) Since libnativeloader_test no longer needs to mock dlopen we can simplify it to a more regular test that loads the tested libs dynamically. Test: mmm art Test: atest art/libnativeloader Test: atest CtsJniTestCases Test: Cuttlefish app compat test that uses NDK translation Test: Manual tests with Android Studio TI agents (http://g/art-module-team/7Jy3Tg7LCh0) Bug: 130340935 Change-Id: I2513472c4e1c44f0fcb01a6b4f6eccbb03718f1d
2021-04-21libnativebridge: fix a potential null deref George Burgess IV
Caught by the static analyzer: > art/libnativebridge/native_bridge.cc:239:40: warning: Access to field 'version' results in a dereference of a null pointer (loaded from variable 'callbacks') [clang-analyzer-core.NullDereference] Bug: None Test: TreeHugger Change-Id: Ia0eb0daac6ee3b07b9ffd615cec9f0a431de2900
2021-04-19Improve logging when we fail to load the native bridge implementation. Martin Stjernholm
Test: boot Bug: 130340935 Change-Id: I5e3b3cc92894e08408c79566a48458876d9bef53
2021-03-19Add min_sdk_version for ART module. Nicolas Geoffray
Bug: 180399951 Test: m Change-Id: I5e2a1ddc3063be26c602bf4db8e6b77f2d54b656
2021-03-02[LSC] Add LOCAL_LICENSE_KINDS to art Bob Badour
Added SPDX-license-identifier-Apache-2.0 to: adbconnection/Android.bp benchmark/Android.bp build/Android.bp build/Android.cpplint.mk build/Android.gtest.mk build/apex/Android.bp build/boot/Android.bp build/sdk/Android.bp cmdline/Android.bp compiler/Android.bp dalvikvm/Android.bp dex2oat/Android.bp dexdump/Android.bp dexlayout/Android.bp dexlist/Android.bp dexoptanalyzer/Android.bp disassembler/Android.bp dt_fd_forward/export/Android.bp imgdiag/Android.bp libartbase/Android.bp libartpalette/Android.bp libartservice/Android.bp libartservice/tests/Android.bp libarttools/Android.bp libdexfile/Android.bp libelffile/Android.bp libnativebridge/Android.bp libnativebridge/tests/Android.bp libnativeloader/Android.bp libnativeloader/test/Android.bp libnativeloader/test/Android.mk libprofile/Android.bp oatdump/Android.bp odrefresh/Android.bp perfetto_hprof/Android.bp profman/Android.bp runtime/Android.bp simulator/Android.bp test/001-HelloWorld/Android.bp test/001-Main/Android.bp test/002-sleep/Android.bp test/004-InterfaceTest/Android.bp test/004-SignalTest/Android.bp test/004-UnsafeTest/Android.bp test/004-checker-UnsafeTest18/Android.bp test/006-args/Android.bp test/007-count10/Android.bp test/009-instanceof/Android.bp test/010-instance/Android.bp test/011-array-copy/Android.bp test/012-math/Android.bp test/013-math2/Android.bp test/014-math3/Android.bp test/015-switch/Android.bp test/016-intern/Android.bp test/017-float/Android.bp test/018-stack-overflow/Android.bp test/019-wrong-array-type/Android.bp test/020-string/Android.bp test/021-string2/Android.bp test/022-interface/Android.bp test/025-access-controller/Android.bp test/026-access/Android.bp test/027-arithmetic/Android.bp test/028-array-write/Android.bp test/029-assert/Android.bp test/030-bad-finalizer/Android.bp test/033-class-init-deadlock/Android.bp test/034-call-null/Android.bp test/035-enum/Android.bp test/036-finalizer/Android.bp test/037-inherit/Android.bp test/038-inner-null/Android.bp test/039-join-main/Android.bp test/040-miranda/Android.bp test/041-narrowing/Android.bp test/043-privates/Android.bp test/044-proxy/Android.bp test/045-reflect-array/Android.bp test/046-reflect/Android.bp test/047-returns/Android.bp test/048-reflect-v8/Android.bp test/049-show-object/Android.bp test/050-sync-test/Android.bp test/051-thread/Android.bp test/052-verifier-fun/Android.bp test/053-wait-some/Android.bp test/054-uncaught/Android.bp test/055-enum-performance/Android.bp test/058-enum-order/Android.bp test/059-finalizer-throw/Android.bp test/061-out-of-memory/Android.bp test/062-character-encodings/Android.bp test/063-process-manager/Android.bp test/067-preemptive-unpark/Android.bp test/070-nio-buffer/Android.bp test/072-precise-gc/Android.bp test/072-reachability-fence/Android.bp test/074-gc-thrash/Android.bp test/076-boolean-put/Android.bp test/078-polymorphic-virtual/Android.bp test/079-phantom/Android.bp test/080-oom-fragmentation/Android.bp test/080-oom-throw-with-finalizer/Android.bp test/080-oom-throw/Android.bp test/081-hot-exceptions/Android.bp test/082-inline-execute/Android.bp test/083-compiler-regressions/Android.bp test/084-class-init/Android.bp test/086-null-super/Android.bp test/087-gc-after-link/Android.bp test/090-loop-formation/Android.bp test/092-locale/Android.bp test/093-serialization/Android.bp test/094-pattern/Android.bp test/095-switch-MAX_INT/Android.bp test/096-array-copy-concurrent-gc/Android.bp test/098-ddmc/Android.bp test/099-vmdebug/Android.bp test/100-reflect2/Android.bp test/1004-checker-volatile-ref-load/Android.bp test/101-fibonacci/Android.bp test/102-concurrent-gc/Android.bp test/103-string-append/Android.bp test/104-growth-limit/Android.bp test/105-invoke/Android.bp test/106-exceptions2/Android.bp test/107-int-math2/Android.bp test/108-check-cast/Android.bp test/109-suspend-check/Android.bp test/110-field-access/Android.bp test/112-double-math/Android.bp test/114-ParallelGC/Android.bp test/115-native-bridge/Android.bp test/116-nodex2oat/Android.bp test/120-hashcode/Android.bp test/121-simple-suspend-check/Android.bp test/122-npe/Android.bp test/123-compiler-regressions-mt/Android.bp test/123-inline-execute2/Android.bp test/125-gc-and-classloading/Android.bp test/128-reg-spill-on-implicit-nullcheck/Android.bp test/129-ThreadGetId/Android.bp test/132-daemon-locks-shutdown/Android.bp test/133-static-invoke-super/Android.bp test/1336-short-finalizer-timeout/Android.bp test/1337-gc-coverage/Android.bp test/1339-dead-reference-safe/Android.bp test/136-daemon-jni-shutdown/Android.bp test/139-register-natives/Android.bp test/140-dce-regression/Android.bp test/140-field-packing/Android.bp test/143-string-value/Android.bp test/144-static-field-sigquit/Android.bp test/148-multithread-gc-annotations/Android.bp test/149-suspend-all-stress/Android.bp test/150-loadlibrary/Android.bp test/151-OpenFileLimit/Android.bp test/152-dead-large-object/Android.bp test/153-reference-stress/Android.bp test/154-gc-loop/Android.bp test/156-register-dex-file-multi-loader/Android.bp test/158-app-image-class-table/Android.bp test/159-app-image-fields/Android.bp test/163-app-image-methods/Android.bp test/165-lock-owner-proxy/Android.bp test/168-vmstack-annotated/Android.bp test/169-threadgroup-jni/Android.bp test/170-interface-init/Android.bp test/172-app-image-twice/Android.bp test/174-escaping-instance-of-bad-class/Android.bp test/175-alloc-big-bignums/Android.bp test/176-app-image-string/Android.bp test/177-visibly-initialized-deadlock/Android.bp test/178-app-image-native-method/Android.bp test/179-nonvirtual-jni/Android.bp test/1900-track-alloc/Android.bp test/1901-get-bytecodes/Android.bp test/1902-suspend/Android.bp test/1903-suspend-self/Android.bp test/1904-double-suspend/Android.bp test/1905-suspend-native/Android.bp test/1906-suspend-list-me-first/Android.bp test/1907-suspend-list-self-twice/Android.bp test/1908-suspend-native-resume-self/Android.bp test/1909-per-agent-tls/Android.bp test/1910-transform-with-default/Android.bp test/1911-get-local-var-table/Android.bp test/1912-get-set-local-primitive/Android.bp test/1913-get-set-local-objects/Android.bp test/1914-get-local-instance/Android.bp test/1915-get-set-local-current-thread/Android.bp test/1916-get-set-current-frame/Android.bp test/1917-get-stack-frame/Android.bp test/1919-vminit-thread-start-timing/Android.bp test/1920-suspend-native-monitor/Android.bp test/1921-suspend-native-recursive-monitor/Android.bp test/1922-owned-monitors-info/Android.bp test/1923-frame-pop/Android.bp test/1924-frame-pop-toggle/Android.bp test/1925-self-frame-pop/Android.bp test/1926-missed-frame-pop/Android.bp test/1927-exception-event/Android.bp test/1928-exception-event-exception/Android.bp test/1930-monitor-info/Android.bp test/1931-monitor-events/Android.bp test/1932-monitor-events-misc/Android.bp test/1933-monitor-current-contended/Android.bp test/1934-jvmti-signal-thread/Android.bp test/1935-get-set-current-frame-jit/Android.bp test/1936-thread-end-events/Android.bp test/1937-transform-soft-fail/Android.bp test/1938-transform-abstract-single-impl/Android.bp test/1939-proxy-frames/Android.bp test/1941-dispose-stress/Android.bp test/1942-suspend-raw-monitor-exit/Android.bp test/1943-suspend-raw-monitor-wait/Android.bp test/1945-proxy-method-arguments/Android.bp test/1947-breakpoint-redefine-deopt/Android.bp test/1949-short-dex-file/Android.bp test/1951-monitor-enter-no-suspend/Android.bp test/1953-pop-frame/Android.bp test/1954-pop-frame-jit/Android.bp test/1955-pop-frame-jit-called/Android.bp test/1956-pop-frame-jit-calling/Android.bp test/1957-error-ext/Android.bp test/1958-transform-try-jit/Android.bp test/1959-redefine-object-instrument/Android.bp test/1960-checker-bounds-codegen/Android.bp test/1960-obsolete-jit-multithread-native/Android.bp test/1961-checker-loop-vectorizer/Android.bp test/1961-obsolete-jit-multithread/Android.bp test/1962-multi-thread-events/Android.bp test/1963-add-to-dex-classloader-in-memory/Android.bp test/1967-get-set-local-bad-slot/Android.bp test/1968-force-early-return/Android.bp test/1969-force-early-return-void/Android.bp test/1970-force-early-return-long/Android.bp test/1971-multi-force-early-return/Android.bp test/1972-jni-id-swap-indices/Android.bp test/1973-jni-id-swap-pointer/Android.bp test/1974-resize-array/Android.bp test/1975-hello-structural-transformation/Android.bp test/1976-hello-structural-static-methods/Android.bp test/1977-hello-structural-obsolescence/Android.bp test/1978-regular-obsolete-then-structural-obsolescence/Android.bp test/1979-threaded-structural-transformation/Android.bp test/1980-obsolete-object-cleared/Android.bp test/1982-no-virtuals-structural-redefinition/Android.bp test/1984-structural-redefine-field-trace/Android.bp test/1985-structural-redefine-stack-scope/Android.bp test/1986-structural-redefine-multi-thread-stack-scope/Android.bp test/1987-structural-redefine-recursive-stack-scope/Android.bp test/1988-multi-structural-redefine/Android.bp test/1989-transform-bad-monitor/Android.bp test/1990-structural-bad-verify/Android.bp test/1991-hello-structural-retransform/Android.bp test/1992-retransform-no-such-field/Android.bp test/1993-fallback-non-structural/Android.bp test/1994-final-virtual-structural/Android.bp test/1995-final-virtual-structural-multithread/Android.bp test/1996-final-override-virtual-structural/Android.bp test/1997-structural-shadow-method/Android.bp test/1998-structural-shadow-field/Android.bp test/1999-virtual-structural/Android.bp test/2003-double-virtual-structural/Android.bp test/2004-double-virtual-structural-abstract/Android.bp test/2005-pause-all-redefine-multithreaded/Android.bp test/2008-redefine-then-old-reflect-field/Android.bp test/201-built-in-except-detail-messages/Android.bp test/2011-stack-walk-concurrent-instrument/Android.bp test/2019-constantcalculationsinking/Android.bp test/202-thread-oome/Android.bp test/2020-InvokeVirtual-Inlining/Android.bp test/2021-InvokeStatic-Inlining/Android.bp test/2022-Invariantloops/Android.bp test/2023-InvariantLoops_typecast/Android.bp test/2024-InvariantNegativeLoop/Android.bp test/2025-ChangedArrayValue/Android.bp test/2026-DifferentMemoryLSCouples/Android.bp test/2027-TwiceTheSameMemoryCouple/Android.bp test/2028-MultiBackward/Android.bp test/2029-contended-monitors/Android.bp test/203-multi-checkpoint/Android.bp test/2030-long-running-child/Android.bp test/2031-zygote-compiled-frame-deopt/Android.bp test/2033-shutdown-mechanics/Android.bp test/2036-jni-filechannel/Android.bp test/2037-thread-name-inherit/Android.bp test/2231-checker-heap-poisoning/Android.bp test/2232-write-metrics-to-log/Android.bp test/300-package-override/Android.bp test/301-abstract-protected/Android.bp test/302-float-conversion/Android.bp test/304-method-tracing/Android.bp test/305-other-fault-handler/Android.bp test/401-optimizing-compiler/Android.bp test/402-optimizing-control-flow/Android.bp test/403-optimizing-long/Android.bp test/404-optimizing-allocator/Android.bp test/405-optimizing-long-allocator/Android.bp test/406-fields/Android.bp test/407-arrays/Android.bp test/408-move-bug/Android.bp test/409-materialized-condition/Android.bp test/410-floats/Android.bp test/411-checker-hdiv-hrem-const/Android.bp test/411-checker-hdiv-hrem-pow2/Android.bp test/411-checker-instruct-simplifier-hrem/Android.bp test/411-optimizing-arith/Android.bp test/413-regalloc-regression/Android.bp test/414-static-fields/Android.bp test/418-const-string/Android.bp test/419-long-parameter/Android.bp test/420-const-class/Android.bp test/421-exceptions/Android.bp test/421-large-frame/Android.bp test/422-instanceof/Android.bp test/422-type-conversion/Android.bp test/423-invoke-interface/Android.bp test/424-checkcast/Android.bp test/426-monitor/Android.bp test/427-bitwise/Android.bp test/427-bounds/Android.bp test/429-ssa-builder/Android.bp test/430-live-register-slow-path/Android.bp test/433-gvn/Android.bp test/434-shifter-operand/Android.bp test/435-try-finally-without-catch/Android.bp test/436-rem-float/Android.bp test/436-shift-constant/Android.bp test/437-inline/Android.bp test/438-volatile/Android.bp test/439-npe/Android.bp test/439-swap-double/Android.bp test/440-stmp/Android.bp test/441-checker-inliner/Android.bp test/443-not-bool-inline/Android.bp test/444-checker-nce/Android.bp test/445-checker-licm/Android.bp test/446-checker-inliner2/Android.bp test/447-checker-inliner3/Android.bp test/449-checker-bce-rem/Android.bp test/449-checker-bce/Android.bp test/450-checker-types/Android.bp test/451-regression-add-float/Android.bp test/451-spill-splot/Android.bp test/454-get-vreg/Android.bp test/455-checker-gvn/Android.bp test/456-baseline-array-set/Android.bp test/458-long-to-fpu/Android.bp test/461-get-reference-vreg/Android.bp test/464-checker-inline-sharpen-calls/Android.bp test/465-checker-clinit-gvn/Android.bp test/466-get-live-vreg/Android.bp test/469-condition-materialization/Android.bp test/470-huge-method/Android.bp test/471-deopt-environment/Android.bp test/472-type-propagation/Android.bp test/473-checker-inliner-constants/Android.bp test/473-remove-dead-block/Android.bp test/474-checker-boolean-input/Android.bp test/474-fp-sub-neg/Android.bp test/475-simplify-mul-zero/Android.bp test/476-checker-ctor-fence-redun-elim/Android.bp test/476-checker-ctor-memory-barrier/Android.bp test/476-clinit-inline-static-invoke/Android.bp test/477-checker-bound-type/Android.bp test/477-long-2-float-convers-precision/Android.bp test/478-checker-clinit-check-pruning/Android.bp test/478-checker-inline-noreturn/Android.bp test/478-checker-inliner-nested-loop/Android.bp test/479-regression-implicit-null-check/Android.bp test/480-checker-dead-blocks/Android.bp test/481-regression-phi-cond/Android.bp test/482-checker-loop-back-edge-use/Android.bp test/483-dce-block/Android.bp test/485-checker-dce-switch/Android.bp test/486-checker-must-do-null-check/Android.bp test/487-checker-inline-calls/Android.bp test/488-checker-inline-recursive-calls/Android.bp test/489-current-method-regression/Android.bp test/490-checker-inline/Android.bp test/491-current-method/Android.bp test/492-checker-inline-invoke-interface/Android.bp test/493-checker-inline-invoke-interface/Android.bp test/494-checker-instanceof-tests/Android.bp test/495-checker-checkcast-tests/Android.bp test/496-checker-inlining-class-loader/Android.bp test/497-inlining-and-class-loader/Android.bp test/499-bce-phi-array-length/Android.bp test/500-instanceof/Android.bp test/505-simplifier-type-propagation/Android.bp test/507-boolean-test/Android.bp test/507-referrer/Android.bp test/508-checker-disassembly/Android.bp test/508-referrer-method/Android.bp test/513-array-deopt/Android.bp test/514-shifts/Android.bp test/519-bound-load-class/Android.bp test/521-checker-array-set-null/Android.bp test/521-regression-integer-field-set/Android.bp test/524-boolean-simplifier-regression/Android.bp test/525-checker-arrays-fields1/Android.bp test/525-checker-arrays-fields2/Android.bp test/526-checker-caller-callee-regs/Android.bp test/526-long-regalloc/Android.bp test/527-checker-array-access-simd/Android.bp test/527-checker-array-access-split/Android.bp test/528-long-hint/Android.bp test/529-long-split/Android.bp test/530-checker-loops1/Android.bp test/530-checker-loops2/Android.bp test/530-checker-loops3/Android.bp test/530-checker-loops4/Android.bp test/530-checker-loops5/Android.bp test/530-checker-lse-ctor-fences/Android.bp test/530-checker-lse-simd/Android.bp test/530-checker-lse/Android.bp test/530-checker-lse2/Android.bp test/530-instanceof-checkcast/Android.bp test/530-regression-lse/Android.bp test/532-checker-nonnull-arrayset/Android.bp test/534-checker-bce-deoptimization/Android.bp test/535-deopt-and-inlining/Android.bp test/536-checker-intrinsic-optimization/Android.bp test/537-checker-arraycopy/Android.bp test/537-checker-jump-over-jump/Android.bp test/538-checker-embed-constants/Android.bp test/540-checker-rtp-bug/Android.bp test/542-bitfield-rotates/Android.bp test/542-inline-trycatch/Android.bp test/542-unresolved-access-check/Android.bp test/545-tracing-and-jit/Android.bp test/548-checker-inlining-and-dce/Android.bp test/549-checker-types-merge/Android.bp test/550-checker-multiply-accumulate/Android.bp test/550-new-instance-clinit/Android.bp test/551-checker-clinit/Android.bp test/551-checker-shifter-operand/Android.bp test/551-implicit-null-checks/Android.bp test/552-checker-sharpening/Android.bp test/552-checker-x86-avx2-bit-manipulation/Android.bp test/554-checker-rtp-checkcast/Android.bp test/555-UnsafeGetLong-regression/Android.bp test/557-checker-instruct-simplifier-ror/Android.bp test/558-switch/Android.bp test/559-bce-ssa/Android.bp test/559-checker-rtp-ifnotnull/Android.bp test/560-packed-switch/Android.bp test/561-divrem/Android.bp test/561-shared-slowpaths/Android.bp test/562-bce-preheader/Android.bp test/562-checker-no-intermediate/Android.bp test/563-checker-invoke-super/Android.bp test/564-checker-bitcount/Android.bp test/564-checker-inline-loop/Android.bp test/564-checker-negbitwise/Android.bp test/565-checker-condition-liveness/Android.bp test/566-checker-codegen-select/Android.bp test/566-polymorphic-inlining/Android.bp test/567-checker-builder-intrinsics/Android.bp test/568-checker-onebit/Android.bp test/570-checker-select/Android.bp test/572-checker-array-get-regression/Android.bp test/573-checker-checkcast-regression/Android.bp test/576-polymorphic-inlining/Android.bp test/577-checker-fp2int/Android.bp test/578-bce-visit/Android.bp test/578-polymorphic-inlining/Android.bp test/579-inline-infinite/Android.bp test/580-checker-round/Android.bp test/580-crc32/Android.bp test/581-rtp/Android.bp test/582-checker-bce-length/Android.bp test/583-checker-zero/Android.bp test/584-checker-div-bool/Android.bp test/589-super-imt/Android.bp test/590-checker-arr-set-null-regression/Android.bp test/591-checker-regression-dead-loop/Android.bp test/593-checker-long-2-float-regression/Android.bp test/594-checker-array-alias/Android.bp test/594-load-string-regression/Android.bp test/595-profile-saving/Android.bp test/597-deopt-busy-loop/Android.bp test/597-deopt-invoke-stub/Android.bp test/597-deopt-new-string/Android.bp test/602-deoptimizeable/Android.bp test/603-checker-instanceof/Android.bp test/604-hot-static-interface/Android.bp test/605-new-string-from-bytes/Android.bp test/607-daemon-stress/Android.bp test/609-checker-inline-interface/Android.bp test/609-checker-x86-bounds-check/Android.bp test/610-arraycopy/Android.bp test/611-checker-simplify-if/Android.bp test/614-checker-dump-constant-location/Android.bp test/615-checker-arm64-store-zero/Android.bp test/616-cha-abstract/Android.bp test/616-cha-interface/Android.bp test/616-cha-miranda/Android.bp test/616-cha-native/Android.bp test/616-cha-regression-proxy-method/Android.bp test/616-cha/Android.bp test/617-clinit-oome/Android.bp test/618-checker-induction/Android.bp test/619-checker-current-method/Android.bp test/620-checker-bce-intrinsics/Android.bp test/622-checker-bce-regressions/Android.bp test/623-checker-loop-regressions/Android.bp test/625-checker-licm-regressions/Android.bp test/626-set-resolved-string/Android.bp test/627-checker-unroll/Android.bp test/628-vdex/Android.bp test/629-vdex-speed/Android.bp test/631-checker-get-class/Android.bp test/632-checker-char-at-bounds/Android.bp test/635-checker-arm64-volatile-load-cc/Android.bp test/636-arm64-veneer-pool/Android.bp test/637-checker-throw-inline/Android.bp test/638-checker-inline-cache-intrinsic/Android.bp test/639-checker-code-sinking/Android.bp test/640-checker-boolean-simd/Android.bp test/640-checker-integer-valueof/Android.bp test/640-checker-simd/Android.bp test/641-checker-arraycopy/Android.bp test/641-iterations/Android.bp test/642-fp-callees/Android.bp test/643-checker-bogus-ic/Android.bp test/645-checker-abs-simd/Android.bp test/646-checker-arraycopy-large-cst-pos/Android.bp test/646-checker-long-const-to-int/Android.bp test/646-checker-simd-hadd/Android.bp test/647-jni-get-field-id/Android.bp test/650-checker-inline-access-thunks/Android.bp test/652-deopt-intrinsic/Android.bp test/654-checker-periodic/Android.bp test/655-checker-simd-arm-opt/Android.bp test/655-jit-clinit/Android.bp test/656-checker-simd-opt/Android.bp test/656-loop-deopt/Android.bp test/657-branches/Android.bp test/658-fp-read-barrier/Android.bp test/660-checker-sad/Android.bp test/660-checker-simd-sad/Android.bp test/660-clinit/Android.bp test/661-checker-simd-reduc/Android.bp test/661-oat-writer-layout/Android.bp test/662-regression-alias/Android.bp test/664-aget-verifier/Android.bp test/665-checker-simd-zero/Android.bp test/666-dex-cache-itf/Android.bp test/667-checker-simd-alignment/Android.bp test/667-jit-jni-stub/Android.bp test/667-out-of-bounds/Android.bp test/669-checker-break/Android.bp test/671-npe-field-opts/Android.bp test/672-checker-throw-method/Android.bp test/673-checker-throw-vmethod/Android.bp test/674-HelloWorld-Dm/Android.bp test/674-hotness-compiled/Android.bp test/676-proxy-jit-at-first-use/Android.bp test/677-fsi2/Android.bp test/679-locks/Android.bp test/680-checker-deopt-dex-pc-0/Android.bp test/680-sink-regression/Android.bp test/684-checker-simd-dotprod/Android.bp test/684-select-condition/Android.bp test/685-deoptimizeable/Android.bp test/687-deopt/Android.bp test/689-multi-catch/Android.bp test/689-zygote-jit-deopt/Android.bp test/693-vdex-inmem-loader-evict/Android.bp test/694-clinit-jit/Android.bp test/695-simplify-throws/Android.bp test/696-loop/Android.bp test/697-checker-string-append/Android.bp test/698-selects/Android.bp test/700-LoadArgRegs/Android.bp test/703-floating-point-div/Android.bp test/704-multiply-accumulate/Android.bp test/705-register-conflict/Android.bp test/707-checker-invalid-profile/Android.bp test/708-jit-cache-churn/Android.bp test/711-checker-type-conversion/Android.bp test/717-integer-value-of/Android.bp test/718-zipfile-finalizer/Android.bp test/720-thread-priority/Android.bp test/721-osr/Android.bp test/726-array-store/Android.bp test/728-imt-conflict-zygote/Android.bp test/805-TooDeepClassInstanceOf/Android.bp test/806-TooWideClassInstanceOf/Android.bp test/812-recursive-default/Android.bp test/813-fp-args/Android.bp test/814-large-field-offsets/Android.bp test/815-invokeinterface-default/Android.bp test/818-clinit-nterp/Android.bp test/900-hello-plugin/Android.bp test/901-hello-ti-agent/Android.bp test/902-hello-transformation/Android.bp test/903-hello-tagging/Android.bp test/904-object-allocation/Android.bp test/905-object-free/Android.bp test/906-iterate-heap/Android.bp test/907-get-loaded-classes/Android.bp test/908-gc-start-finish/Android.bp test/910-methods/Android.bp test/911-get-stack-trace/Android.bp test/913-heaps/Android.bp test/914-hello-obsolescence/Android.bp test/915-obsolete-2/Android.bp test/916-obsolete-jit/Android.bp test/917-fields-transformation/Android.bp test/918-fields/Android.bp test/919-obsolete-fields/Android.bp test/920-objects/Android.bp test/921-hello-failure/Android.bp test/922-properties/Android.bp test/923-monitors/Android.bp test/924-threads/Android.bp test/925-threadgroups/Android.bp test/926-multi-obsolescence/Android.bp test/927-timers/Android.bp test/928-jni-table/Android.bp test/930-hello-retransform/Android.bp test/931-agent-thread/Android.bp test/932-transform-saves/Android.bp test/933-misc-events/Android.bp test/937-hello-retransform-package/Android.bp test/939-hello-transformation-bcp/Android.bp test/940-recursive-obsolete/Android.bp test/941-recursive-obsolete-jit/Android.bp test/942-private-recursive/Android.bp test/943-private-recursive-jit/Android.bp test/944-transform-classloaders/Android.bp test/945-obsolete-native/Android.bp test/946-obsolete-throw/Android.bp test/947-reflect-method/Android.bp test/949-in-memory-transform/Android.bp test/950-redefine-intrinsic/Android.bp test/951-threaded-obsolete/Android.bp test/963-default-range-smali/Android.bp test/982-ok-no-retransform/Android.bp test/983-source-transform-verify/Android.bp test/984-obsolete-invoke/Android.bp test/985-re-obsolete/Android.bp test/986-native-method-bind/Android.bp test/987-agent-bind/Android.bp test/988-method-trace/Android.bp test/989-method-trace-throw/Android.bp test/990-field-trace/Android.bp test/991-field-trace-2/Android.bp test/992-source-data/Android.bp test/993-breakpoints/Android.bp test/994-breakpoint-line/Android.bp test/995-breakpoints-throw/Android.bp test/996-breakpoint-obsolete/Android.bp test/997-single-step/Android.bp test/Android.bp tools/Android.bp tools/ahat/Android.bp tools/ahat/Android.mk tools/art_verifier/Android.bp tools/cpp-define-generator/Android.bp tools/dexanalyze/Android.bp tools/dexfuzz/Android.bp tools/dmtracedump/Android.bp tools/hiddenapi/Android.bp tools/jfuzz/Android.bp tools/jvmti-agents/breakpoint-logger/Android.bp tools/jvmti-agents/chain-agents/Android.bp tools/jvmti-agents/dump-jvmti-state/Android.bp tools/jvmti-agents/enable-vlog/Android.bp tools/jvmti-agents/field-counts/Android.bp tools/jvmti-agents/field-null-percent/Android.bp tools/jvmti-agents/jit-load/Android.bp tools/jvmti-agents/list-extensions/Android.bp tools/jvmti-agents/simple-force-redefine/Android.bp tools/jvmti-agents/simple-profile/Android.bp tools/jvmti-agents/ti-alloc-sample/Android.bp tools/jvmti-agents/ti-fast/Android.bp tools/jvmti-agents/titrace/Android.bp tools/jvmti-agents/wrapagentproperties/Android.bp tools/signal_dumper/Android.bp tools/tracefast-plugin/Android.bp tools/veridex/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: sigchainlib/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-GPL-2.0 to: Android.bp Android.mk Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-GPL-with-classpath-exception to: dt_fd_forward/Android.bp openjdkjvmti/Android.bp Added SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-GPL-with-classpath-exception to: openjdkjvm/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: If775045c12955fa6d72d40ccf2a09beef93d1699 Merged-in: If775045c12955fa6d72d40ccf2a09beef93d1699
2021-02-11libnativebridge: mount /system/etc/cpuinfo.<isa>.txt as /proc/cpuinfo Evgeny Eltsin
Bug: 179753190 Test: m Change-Id: I0facaa0da9872d78ac40f6bde78bdc32ac07d597
2021-02-10Mark cc_test as not gtest since they are not gtest Julien Desprez
Change-Id: I9c515b69819d06931ca7045b59e54ad320c16b0c Test: None Bug: 179092189
2020-11-04Move hardcoded Soong apex_available lines for ART modules into ART Martin Stjernholm
blueprints. Test: m droid Bug: 133140750 Change-Id: I99139a4f8c618f237fa169e125de9479feaeb07f
2020-11-04Fix missing //apex_available:platform on some libs. Martin Stjernholm
They're used from platform libs, e.g. libandroid_runtime. Also changed the *_lazy shims to use the more precise runtime_libs for their dlopen dependencies. Test: m Bug: 133140750 Change-Id: I4a3f1af6155b414aed4aac7a28365177ea1ae716
2020-10-23Rename ART release APEX to com.android.art. Martin Stjernholm
Test: Build & boot on AOSP master Test: `m` on AOSP master, flipping PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD between true and false, and check out/target/product/bonito/symbols/apex/com.android.art. Test: art/build/apex/runtests.sh Test: art/tools/buildbot-build.sh {--host,--target} Test: art/tools/run-gtests.sh Test: m test-art-host-gtest Test: art/test/testrunner/testrunner.py --target --64 --optimizing Test: m build-art-target-golem Bug: 169639321 Change-Id: Ic4bb8d6f9988ce99bba326b9c635bd3c01ed74ab Merged-In: Ic4bb8d6f9988ce99bba326b9c635bd3c01ed74ab
2020-09-16Remove dangling symlinks to clang-format config. Martin Stjernholm
Before the move symlinks pointed to system/core/.clang-format-2, which points to build/soong/scripts/system-clang-format-2. ART style is not (yet) enforced with clang-format, but if that changes it should apply here too. Test: n/a Change-Id: Ib27dcf053e88a51782cbd295a7ccd4c66365fbd1
2020-07-27libnativebridge: updates for Android's inclusive language guidance Orion Hodson
Based on: https://source.android.com/setup/contribute/respectful-code Bug: 161896447 Bug: 161850439 Bug: 161336379 Test: treehugger Change-Id: I11c2bc377bccb84c5ad587350c76972614262c23