| Art versions in the directory, and where they were build from | |
| ------------------------------------------------------------- | |
| See https://source.android.com/source/build-numbers.html for build numbers. | |
| Device names: | |
| angler: Nexus 6P | |
| mako: Nexus 4 | |
| art (default) | |
| ------------- | |
| Build from AOSP branch master. To update to a new AOSP master | |
| mkdir master | |
| cd master | |
| repo init -u https://android.googlesource.com/platform/manifest -b master | |
| repo sync -cq -j24 | |
| source build/envsetup.sh | |
| lunch aosp_angler-eng | |
| m -j24 | |
| m -j24 build-art | |
| m -j24 test-art-host | |
| Collected into tools/linux/art | |
| scripts/update-host-art.sh --android-checkout ~/android/master --art-dir art | |
| The precise info for the AOSP master used is in aosp_master_manifest.xml, which is | |
| produced using this command: | |
| repo manifest -o aosp_master_manifest.xml -r | |
| To reproduce that AOSP state, use the following commands: | |
| mkdir master | |
| cd master | |
| mkdir -p .repo/manifests | |
| cp <r8-checkout>/aosp_master_manifest.xml .repo/manifests | |
| repo init -u https://android.googlesource.com/platform/manifest -m aosp_master_manifest.xml | |
| <continue with repo sync as above> | |
| art-master (Currently Android U) | |
| -------------------------------- | |
| Build from master, build spec included. Art at 31b98e9ce8fbb56c3507c8e7718881efa1ce9f63. | |
| repo sync -cq -j24 | |
| source build/envsetup.sh | |
| lunch aosp_redfin-userdebug | |
| m -j48 | |
| m -j48 build-art | |
| m -j48 test-art-host | |
| repo manifest -r -o build_spec.xml | |
| Collected into tools/linux/host/art-master. The "host" path element is checked | |
| by the script for running Art. | |
| cd <r8 checkout> | |
| scripts/update-host-art.sh \ | |
| --android-checkout <...>/android/tm-dev \ | |
| --art-dir host/art-master \ | |
| --android-product redfin | |
| (cd tools/linux/host; upload_to_google_storage.py -a --bucket r8-deps art-master) | |
| repo init -b udc-preview1-release | |
| art-15 (Android V) | |
| ------------------ | |
| Build branch 24Q3-release. Art at 5b498ae35e41f63dddb36d1c22c05165f4bb815d | |
| export BRANCH=24Q3-release | |
| mkdir ${BRANCH} | |
| cd ${BRANCH} | |
| export ANDROID_CHECKOUT=$(pwd) | |
| repo init -u https://android.googlesource.com/platform/manifest -b ${BRANCH} | |
| repo sync -cq -j48 | |
| source build/envsetup.sh | |
| lunch aosp_akita-trunk_staging-userdebug | |
| m -j | |
| m -j build-art | |
| m -j test-art-host | |
| repo manifest -r -o build_spec.xml | |
| Collected into tools/linux/host/art-15.0.0-beta2. The "host" path element is checked | |
| by the script for running Art. | |
| cd <r8 checkout> | |
| scripts/update-host-art.sh \ | |
| --android-checkout $ANDROID_CHECKOUT \ | |
| --art-dir host/art-15.0.0-beta2 \ | |
| --android-product akita | |
| (cd tools/linux/host; upload_to_google_storage.py -a --bucket r8-deps art-15.0.0-beta2) | |
| art-14 (Android U) | |
| ------------------ | |
| Build branch udc-beta3-release. Art at 1f3514c28caf4537fe0fdf14559991ca23cf9e30. | |
| export BRANCH=udc-beta3-release | |
| mkdir ${BRANCH} | |
| cd ${BRANCH} | |
| export ANDROID_CHECKOUT=$(pwd) | |
| repo init -u https://android.googlesource.com/platform/manifest -b ${BRANCH} | |
| repo sync -cq -j48 | |
| source build/envsetup.sh | |
| lunch aosp_redfin-userdebug | |
| m -j48 | |
| m -j48 build-art | |
| m -j48 test-art-host | |
| repo manifest -r -o build_spec.xml | |
| Collected into tools/linux/host/art-14.0.0-dp1. The "host" path element is checked | |
| by the script for running Art. | |
| cd <r8 checkout> | |
| scripts/update-host-art.sh \ | |
| --android-checkout $ANDROID_CHECKOUT \ | |
| --art-dir host/art-14.0.0-beta3 \ | |
| --android-product redfin | |
| (cd tools/linux/host; upload_to_google_storage.py -a --bucket r8-deps art-14.0.0-beta3) | |
| art-13 (Android T) | |
| ------------------ | |
| Build branch android-13.0.0_r3. | |
| export BRANCH=android-13.0.0_r3 | |
| mkdir ${BRANCH} | |
| cd ${BRANCH} | |
| repo init -u https://android.googlesource.com/platform/manifest -b ${BRANCH} | |
| repo sync -cq -j48 | |
| source build/envsetup.sh | |
| lunch aosp_redfin-userdebug | |
| USE_RBE=false m -j48 | |
| USE_RBE=false m -j48 build-art | |
| USE_RBE=false m -j48 test-art-host | |
| Collected into tools/linux/host/art-13. The "host" path element is checked | |
| by the script for running Art. | |
| cd <r8 checkout> | |
| scripts/update-host-art.sh \ | |
| --android-checkout <...>/android-13.0.0_r3 \ | |
| --art-dir host/art-13.0.0 \ | |
| --android-product redfin | |
| (cd tools/linux/host; upload_to_google_storage.py -a --bucket r8-deps art-13.0.0) | |
| art-12.0.0 (Android S) | |
| --------------------- | |
| Build from branch sc-beta4-release. | |
| export BRANCH=sc-beta4-release | |
| mkdir ${BRANCH} | |
| cd ${BRANCH} | |
| repo init -u https://android.googlesource.com/platform/manifest -b ${BRANCH} | |
| repo sync -cq -j24 | |
| source build/envsetup.sh | |
| lunch aosp_redfin-userdebug | |
| m -j48 | |
| m -j48 build-art | |
| m -j48 test-art-host | |
| Collected into tools/linux/host/art-12.0.0-beta4. The "host" path element is checked | |
| by the script for running Art. | |
| cd <r8 checkout> | |
| scripts/update-host-art.sh \ | |
| --android-checkout /usr/local/ssd/android/${BRANCH} \ | |
| --art-dir host/art-12.0.0-beta4 \ | |
| --android-product redfin | |
| The dex2oat tool expects to find core-oj.dex in out/host/linux-x86 so copy it. | |
| (cd tools/linux/host; cp -r apex out/host/linux-x86/apex) | |
| (cd tools/linux/host; upload_to_google_storage.py -a --bucket r8-deps art-12.0.0-beta4) | |
| art-10.0.0 (Android Q) | |
| --------------------- | |
| Build from branch android-10.0.0_r14. | |
| export BRANCH=android-10.0.0_r14 | |
| mkdir ${BRANCH} | |
| cd ${BRANCH} | |
| repo init -u https://android.googlesource.com/platform/manifest -b ${BRANCH} | |
| repo sync -cq -j24 | |
| source build/envsetup.sh | |
| lunch aosp_coral-userdebug | |
| m -j24 | |
| m -j24 build-art | |
| m -j24 test-art-host | |
| Collected into tools/linux/art-10.0.0. | |
| cd <r8 checkout> | |
| scripts/update-host-art.sh \ | |
| --android-checkout /usr/local/ssd/android/${BRANCH} \ | |
| --art-dir art-10.0.0 \ | |
| --android-product coral | |
| art-9.0.0 (Android P) | |
| --------------------- | |
| Build from branch android-9.0.0_r18. | |
| export BRANCH=android-9.0.0_r18 | |
| mkdir ${BRANCH} | |
| cd ${BRANCH} | |
| repo init -u https://android.googlesource.com/platform/manifest -b ${BRANCH} | |
| repo sync -cq -j24 | |
| source build/envsetup.sh | |
| lunch aosp_marlin-userdebug | |
| m -j24 | |
| m -j24 build-art | |
| m -j24 test-art-host | |
| Collected into tools/linux/art-9.0.0. | |
| cd <r8 checkout> | |
| scripts/update-host-art.sh \ | |
| --android-checkout /usr/local/ssd/android/${BRANCH} \ | |
| --art-dir art-9.0.0 \ | |
| --android-product marlin | |
| art-8.1.0 (Android O MR1) | |
| ------------------------- | |
| Build from branch android-8.1.0_r51. | |
| export BRANCH=android-8.1.0_r51 | |
| mkdir ${BRANCH} | |
| cd ${BRANCH} | |
| repo init -u https://android.googlesource.com/platform/manifest -b ${BRANCH} | |
| repo sync -cq -j24 | |
| source build/envsetup.sh | |
| lunch aosp_marlin-userdebug | |
| m -j24 | |
| m -j24 build-art | |
| m -j24 test-art-host | |
| Collected into tools/linux/art-8.1.0. | |
| cd <r8 checkout> | |
| scripts/update-host-art.sh \ | |
| --android-checkout /usr/local/ssd/android/${BRANCH} \ | |
| --art-dir art-8.1.0 \ | |
| --android-product marlin | |
| art-7.0.0 | |
| --------- | |
| Build from branch android-7.0.0_r21 with the following patch: | |
| diff --git a/runtime/thread.cc b/runtime/thread.cc | |
| index 16f30cded..acdd995e9 100644 | |
| --- a/runtime/thread.cc | |
| +++ b/runtime/thread.cc | |
| @@ -554,6 +554,12 @@ void Thread::InstallImplicitProtection() { | |
| // AddressSanitizer does not like the part of this functions that reads every stack page. | |
| // Looks a lot like an out-of-bounds access. | |
| + // | |
| + // Accesses too far below the current machine register corresponding to the stack pointer (e.g., | |
| + // ESP on x86[-32], SP on ARM) might cause a SIGSEGV (at least on x86 with newer kernels). We | |
| + // thus have to move the stack pointer. We do this portably by using a recursive function with a | |
| + // large stack frame size. | |
| + | |
| // (Defensively) first remove the protection on the protected region as will want to read | |
| // and write it. Ignore errors. | |
| UnprotectStack(); | |
| @@ -561,12 +567,26 @@ void Thread::InstallImplicitProtection() { | |
| VLOG(threads) << "Need to map in stack for thread at " << std::hex << | |
| static_cast<void*>(pregion); | |
| - // Read every page from the high address to the low. | |
| - volatile uint8_t dont_optimize_this; | |
| - UNUSED(dont_optimize_this); | |
| - for (uint8_t* p = stack_top; p >= pregion; p -= kPageSize) { | |
| - dont_optimize_this = *p; | |
| - } | |
| + struct RecurseDownStack { | |
| + // This function has an intentionally large stack size. | |
| +#pragma GCC diagnostic push | |
| +#pragma GCC diagnostic ignored "-Wframe-larger-than=" | |
| + NO_INLINE | |
| + static void Touch(uintptr_t target) { | |
| + volatile size_t zero = 0; | |
| + // Use a large local volatile array to ensure a large frame size. Do not use anything close | |
| + // to a full page for ASAN. It would be nice to ensure the frame size is at most a page, but | |
| + // there is no pragma support for this. | |
| + volatile char space[kPageSize - 256]; | |
| + char sink ATTRIBUTE_UNUSED = space[zero]; | |
| + if (reinterpret_cast<uintptr_t>(space) >= target + kPageSize) { | |
| + Touch(target); | |
| + } | |
| + zero *= 2; // Try to avoid tail recursion. | |
| + } | |
| +#pragma GCC diagnostic pop | |
| + }; | |
| + RecurseDownStack::Touch(reinterpret_cast<uintptr_t>(pregion)); | |
| VLOG(threads) << "(again) installing stack protected region at " << std::hex << | |
| static_cast<void*>(pregion) << " to " << | |
| mkdir 7.0.0_r21 | |
| cd 7.0.0_r21 | |
| repo init -u https://android.googlesource.com/platform/manifest -b android-7.0.0_r21 | |
| repo sync -cq -j24 | |
| source build/envsetup.sh | |
| lunch aosp_angler-userdebug | |
| cd art | |
| <apply patch> | |
| cd .. | |
| m -j24 | |
| m -j24 build-art | |
| m -j24 test-art-host | |
| Collected into tools/linux/art-7.0.0. | |
| scripts/update-host-art.sh --android-checkout ~/android/7.0.0_r21 --art-dir art-7.0.0 | |
| art-6.0.1 | |
| --------- | |
| Build from branch android-6.0.1_r66 with the following patch: | |
| diff --git a/runtime/thread.cc b/runtime/thread.cc | |
| index 6e8f89cb4..788d717ca 100644 | |
| --- a/runtime/thread.cc | |
| +++ b/runtime/thread.cc | |
| @@ -357,20 +357,37 @@ void Thread::InstallImplicitProtection() { | |
| uint8_t* stack_top = reinterpret_cast<uint8_t*>(reinterpret_cast<uintptr_t>(&stack_himem) & | |
| ~(kPageSize - 1)); // Page containing current top of stack. | |
| + // | |
| + // Accesses too far below the current machine register corresponding to the stack pointer (e.g., | |
| + // ESP on x86[-32], SP on ARM) might cause a SIGSEGV (at least on x86 with newer kernels). We | |
| + // thus have to move the stack pointer. We do this portably by using a recursive function with a | |
| + // large stack frame size. | |
| + | |
| // First remove the protection on the protected region as will want to read and | |
| // write it. This may fail (on the first attempt when the stack is not mapped) | |
| // but we ignore that. | |
| UnprotectStack(); | |
| - // Map in the stack. This must be done by reading from the | |
| - // current stack pointer downwards as the stack may be mapped using VM_GROWSDOWN | |
| - // in the kernel. Any access more than a page below the current SP might cause | |
| - // a segv. | |
| - | |
| - // Read every page from the high address to the low. | |
| - for (uint8_t* p = stack_top; p >= pregion; p -= kPageSize) { | |
| - dont_optimize_this = *p; | |
| - } | |
| + struct RecurseDownStack { | |
| + // This function has an intentionally large stack size. | |
| +#pragma GCC diagnostic push | |
| +#pragma GCC diagnostic ignored "-Wframe-larger-than=" | |
| + NO_INLINE | |
| + static void Touch(uintptr_t target) { | |
| + volatile size_t zero = 0; | |
| + // Use a large local volatile array to ensure a large frame size. Do not use anything close | |
| + // to a full page for ASAN. It would be nice to ensure the frame size is at most a page, but | |
| + // there is no pragma support for this. | |
| + volatile char space[kPageSize - 256]; | |
| + char sink ATTRIBUTE_UNUSED = space[zero]; | |
| + if (reinterpret_cast<uintptr_t>(space) >= target + kPageSize) { | |
| + Touch(target); | |
| + } | |
| + zero *= 2; // Try to avoid tail recursion. | |
| + } | |
| +#pragma GCC diagnostic pop | |
| + }; | |
| + RecurseDownStack::Touch(reinterpret_cast<uintptr_t>(pregion)); | |
| VLOG(threads) << "installing stack protected region at " << std::hex << | |
| static_cast<void*>(pregion) << " to " << | |
| mkdir 6.0.1_r66 | |
| cd 6.0.1_r66 | |
| repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.1_r66 | |
| repo sync -cq -j24 | |
| source build/envsetup.sh | |
| lunch aosp_angler-userdebug | |
| cd art | |
| <apply patch> | |
| cd .. | |
| m -j24 | |
| m -j24 build-art | |
| m -j24 test-art-host | |
| Collected into tools/linux/art-6.0.1. | |
| scripts/update-host-art.sh --android-checkout ~/android/6.0.1_r66 --art-dir art-6.0.1 | |
| art-5.1.1 | |
| --------- | |
| Build from branch 5.1.1_r19 with the following patch: | |
| diff --git a/runtime/thread.cc b/runtime/thread.cc | |
| index 2f474f7ae..f927ad7a3 100644 | |
| --- a/runtime/thread.cc | |
| +++ b/runtime/thread.cc | |
| @@ -257,20 +257,39 @@ void Thread::InstallImplicitProtection() { | |
| byte* stack_top = reinterpret_cast<byte*>(reinterpret_cast<uintptr_t>(&stack_himem) & | |
| ~(kPageSize - 1)); // Page containing current top of stack. | |
| + // | |
| + // Accesses too far below the current machine register corresponding to the stack pointer (e.g., | |
| + // ESP on x86[-32], SP on ARM) might cause a SIGSEGV (at least on x86 with newer kernels). We | |
| + // thus have to move the stack pointer. We do this portably by using a recursive function with a | |
| + // large stack frame size. | |
| + | |
| // First remove the protection on the protected region as will want to read and | |
| // write it. This may fail (on the first attempt when the stack is not mapped) | |
| // but we ignore that. | |
| UnprotectStack(); | |
| - // Map in the stack. This must be done by reading from the | |
| - // current stack pointer downwards as the stack may be mapped using VM_GROWSDOWN | |
| - // in the kernel. Any access more than a page below the current SP might cause | |
| - // a segv. | |
| - | |
| - // Read every page from the high address to the low. | |
| - for (byte* p = stack_top; p >= pregion; p -= kPageSize) { | |
| - dont_optimize_this = *p; | |
| - } | |
| +#define NO_INLINE __attribute__ ((noinline)) | |
| +#define ATTRIBUTE_UNUSED __attribute__((__unused__)) | |
| + struct RecurseDownStack { | |
| + // This function has an intentionally large stack size. | |
| +#pragma GCC diagnostic push | |
| +#pragma GCC diagnostic ignored "-Wframe-larger-than=" | |
| + NO_INLINE | |
| + static void Touch(uintptr_t target) { | |
| + volatile size_t zero = 0; | |
| + // Use a large local volatile array to ensure a large frame size. Do not use anything close | |
| + // to a full page for ASAN. It would be nice to ensure the frame size is at most a page, but | |
| + // there is no pragma support for this. | |
| + volatile char space[kPageSize - 256]; | |
| + char sink ATTRIBUTE_UNUSED = space[zero]; | |
| + if (reinterpret_cast<uintptr_t>(space) >= target + kPageSize) { | |
| + Touch(target); | |
| + } | |
| + zero *= 2; // Try to avoid tail recursion. | |
| + } | |
| +#pragma GCC diagnostic pop | |
| + }; | |
| + RecurseDownStack::Touch(reinterpret_cast<uintptr_t>(pregion)); | |
| VLOG(threads) << "installing stack protected region at " << std::hex << | |
| static_cast<void*>(pregion) << " to " << | |
| mkdir 5.1.1_r19 | |
| cd 5.1.1_r19 | |
| repo init -u https://android.googlesource.com/platform/manifest -b android-5.1.1_r19 | |
| repo sync -cq -j24 | |
| source build/envsetup.sh | |
| lunch aosp_mako-userdebug | |
| cd art | |
| <apply patch> | |
| cd .. | |
| m -j24 | |
| m -j24 build-art | |
| m -j24 test-art-host | |
| Collected into tools/linux/art-5.1.1. | |
| scripts/update-host-art.sh --android-checkout ~/android/5.1.1_r19 --art-dir art-5.1.1 --android-product mako |