I'm try to build aosp 6.0.0_r1 . got `memory corruption`
My environment
M1 Mac OS
[Docker ubuntu14](https://android.googlesource.com/platform/build/+/master/tools/docker)
memory 16G
swap 4G
-
docker build \ --tag=aosp-build:ubuntu14.04 \ --platform linux/amd64 \ # abi --build-arg userid=1000 --build-arg groupid=1000 --build-arg username=tom \ --file=aosp.ubuntu14.dockerfile .
I have re-make many times , every time got the same error .
I have try clean and re-make , got the same error .
My error info
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=6.0
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_OS=linux
HOST_OS_EXTRA=Linux-6.6.16-linuxkit-x86_64-with-Ubuntu-14.04-trusty
HOST_BUILD_TYPE=release
BUILD_ID=MRA58K
OUT_DIR=/aosp-6.0.0_r1/out
============================================
including ./abi/cpp/Android.mk ...
/* many other include */
including ./tools/external/fat32lib/Android.mk ...
make: Entering directory `/media/tom/Beyourself/AOSP/android-6.0.0_r1'
target dex2oat: /aosp-6.0.0_r1/out/target/product/generic/dex_bootjars/system/framework/arm/boot.art (/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/javalib.jar /aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/conscrypt_intermediates/javalib.jar /aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/okhttp_intermediates/javalib.jar /aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/core-junit_intermediates/javalib.jar /aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/bouncycastle_intermediates/javalib.jar /aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/javalib.jar /aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/javalib.jar /aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/telephony-common_intermediates/javalib.jar /aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/voip-common_intermediates/javalib.jar /aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/ims-common_intermediates/javalib.jar /aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/apache-xml_intermediates/javalib.jar /aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/org.apache.http.legacy.boot_intermediates/javalib.jar art/runtime/oat.cc art/runtime/image.cc)
dex2oatd W 6560 6560 art/runtime/arch/arm/instruction_set_features_arm.cc:96] Unknown instruction set features for ARM CPU variant (generic) using conservative defaults
dex2oatd I 6560 6560 art/dex2oat/dex2oat.cc:2037] /aosp-6.0.0_r1/out/host/linux-x86/bin/dex2oatd --runtime-arg -Xms64m --runtime-arg -Xmx64m --image-classes=frameworks/base/preloaded-classes --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/javalib.jar --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/conscrypt_intermediates/javalib.jar --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/okhttp_intermediates/javalib.jar --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/core-junit_intermediates/javalib.jar --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/bouncycastle_intermediates/javalib.jar --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/javalib.jar --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/javalib.jar --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/telephony-common_intermediates/javalib.jar --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/voip-common_intermediates/javalib.jar --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/ims-common_intermediates/javalib.jar --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/apache-xml_intermediates/javalib.jar --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/org.apache.http.legacy.boot_intermediates/javalib.jar --dex-location=/system/framework/core-libart.jar --dex-location=/system/framework/conscrypt.jar --dex-location=/system/framework/okhttp.jar --dex-location=/system/framework/core-junit.jar --dex-location=/system/framework/bouncycastle.jar --dex-location=/system/framework/ext.jar --dex-location=/system/framework/framework.jar --dex-location=/system/framework/telephony-common.jar --dex-location=/system/framework/voip-common.jar --dex-location=/system/framework/ims-common.jar --dex-location=/system/framework/apache-xml.jar --dex-location=/system/framework/org.apache.http.legacy.boot.jar --oat-symbols=/aosp-6.0.0_r1/out/target/product/generic/symbols/system/framework/arm/boot.oat --oat-file=/aosp-6.0.0_r1/out/target/product/generic/dex_bootjars/system/framework/arm/boot.oat --oat-location=/system/framework/arm/boot.oat --image=/aosp-6.0.0_r1/out/target/product/generic/dex_bootjars/system/framework/arm/boot.art --base=0x70000000 --instruction-set=arm --instruction-set-variant=generic --instruction-set-features=default --android-root=/aosp-6.0.0_r1/out/target/product/generic/system --include-patch-information --runtime-arg -Xnorelocate --no-generate-debug-info
dex2oatd I 6560 6560 art/runtime/parsed_options.cc:434] setting boot class path to /aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/javalib.jar:/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/conscrypt_intermediates/javalib.jar:/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/okhttp_intermediates/javalib.jar:/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/core-junit_intermediates/javalib.jar:/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/bouncycastle_intermediates/javalib.jar:/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/javalib.jar:/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/javalib.jar:/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/telephony-common_intermediates/javalib.jar:/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/voip-common_intermediates/javalib.jar:/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/ims-common_intermediates/javalib.jar:/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/apache-xml_intermediates/javalib.jar:/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/org.apache.http.legacy.boot_intermediates/javalib.jar
dex2oatd F 6560 6560 art/runtime/runtime_linux.cc:332]*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) fault addr 0xf97743c0
OS: Linux 6.6.16-linuxkit (x86_64)
Cmdline: /aosp-6.0.0_r1/out/host/linux-x86/bin/dex2oatd --runtime-arg -Xms64m --runtime-arg -Xmx64m --image-classes=frameworks/base/preloaded-classes --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/javalib.jar --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/conscrypt_intermediates/javalib.jar --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/okhttp_intermediates/javalib.jar --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/core-junit_intermediates/javalib.jar --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/bouncycastle_intermediates/javalib.jar --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/javalib.jar --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/javalib.jar --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/telephony-common_intermediates/javalib.jar --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/voip-common_intermediates/javalib.jar --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/ims-common_intermediates/javalib.jar --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/apache-xml_intermediates/javalib.jar --dex-file=/aosp-6.0.0_r1/out/target/common/obj/JAVA_LIBRARIES/org.apache.http.legacy.boot_intermediates/javalib.jar --dex-location=/system/framework/core-libart.jar --dex-location=/system/framework/conscrypt.jar --dex-location=/system/framework/okhttp.jar --dex-location=/system/framework/core-junit.jar --dex-location=/system/framework/bouncycastle.jar --dex-location=/system/framework/ext.jar --dex-location=/system/framework/framework.jar --dex-location=/system/framework/telephony-common.jar --dex-location=/system/framework/voip-common.jar --dex-location=/system/framework/ims-common.jar --dex-location=/system/framework/apache-xml.jar --dex-location=/system/framework/org.apache.http.legacy.boot.jar --oat-symbols=/aosp-6.0.0_r1/out/target/product/generic/symbols/system/framework/arm/boot.oat --oat-file=/aosp-6.0.0_r1/out/target/product/generic/dex_bootjars/system/framework/arm/boot.oat --oat-location=/system/framework/arm/boot.oat --image=/aosp-6.0.0_r1/out/target/product/generic/dex_bootjars/system/framework/arm/boot.art --base=0x70000000 --instruction-set=arm --instruction-set-variant=generic --instruction-set-features=default --android-root=/aosp-6.0.0_r1/out/target/product/generic/system --include-patch-information --runtime-arg -Xnorelocate --no-generate-debug-info
Thread: 6560 "main"
Registers:
rax: 0x00000000f97743c0 rbx: 0x00000000000002c8 rcx: 0x00007ffffea3d320 rdx: 0x0000000000000000
rdi: 0x00000000f97743c0 rsi: 0x00007fffffdd8448 rbp: 0x00007fffffdd85c0 rsp: 0x00007fffffdd7f80
r8 : 0x00007efff8899200 r9 : 0x00005555555881c0 r10: 0x0000000000200000 r11: 0x00007ffff9774010
r12: 0x000055555558a5f0 r13: 0x00005555555821e0 r14: 0x00007fffffdd8454 r15: 0x00005555555899b0
rip: 0x00007ffffeca8305 eflags: 0x00000206 [ PF IF ]
cs: 0x00000033 gs: 0x0000f977 fs: 0x00000000
Backtrace:
*** Error in `/aosp-6.0.0_r1/out/host/linux-x86/bin/dex2oatd': malloc(): memory corruption: 0x000055555558d520 ***
dex2oatd F 6560 6560 art/runtime/runtime_linux.cc:307] HandleUnexpectedSignal reentered
make: *** [/aosp-6.0.0_r1/out/target/product/generic/dex_bootjars/system/framework/arm/boot.art] Error 1
make: Leaving directory `/media/tom/Beyourself/AOSP/android-6.0.0_r1'
[0;31m#### make failed to build some targets (03:22 (mm:ss)) ####[00m
According to Google documents, the AOSP build needs 64GB RAM minimum.
Set up for AOSP development