google / sanitizers

AddressSanitizer, ThreadSanitizer, MemorySanitizer
Other
11.36k stars 1.02k forks source link

[Android O Nexus 6P]==22003==Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING. #921

Open wqycsu opened 6 years ago

wqycsu commented 6 years ago

I follow this guide https://github.com/google/sanitizers/wiki/AddressSanitizerOnAndroidO to complete configuration of my project, copy the libclang_rt.asan-arm-android.so and wrap.sh to the native libraries directory. But when I run my app, it cannot run and I get these logs.

[ 03-01 21:33:26.418 22003:22003 I/         ]
                                           ==22003==Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING.
                                           [ 03-01 21:33:26.418 22003:22003 I/         ]
                                           [ 03-01 21:33:26.453 22003:22003 I/         ]
                                           ==22003==Process memory map follows:
                                           [ 03-01 21:33:26.453 22003:22003 I/         ]
                                           [ 03-01 21:33:26.454 22003:22003 I/         ]
                                            0x12c00000-0x52c00000   /dev/ashmem/dalvik-main space (region space) (deleted)
                                           [ 03-01 21:33:26.454 22003:22003 I/         ]
                                           [ 03-01 21:33:26.454 22003:22003 I/         ]
                                            0x703b0000-0x70596000   /data/dalvik-cache/arm/system@framework@boot.art 
                                           [ 03-01 21:33:26.454 22003:22003 I/         ]
                                           [ 03-01 21:33:26.454 22003:22003 I/         ]
                                            0x70596000-0x70653000   /data/dalvik-cache/arm/system@framework@boot-core-libart.art  
                                           [ 03-01 21:33:26.454 22003:22003 I/         ]

Device: Huawei Nexus 6P Os Version: 8.0 NDK: r10e

eugenis commented 6 years ago

This is a kernel version that is incompatible with older versions of asan. Unfortunately, even the latest NDK does not have the fixed version of asan. The kernel patch has been reverted at some point, so a future update might fix it (or not).

You can grab a newer toolchain from chromium, but I'm not sure it will work as a drop-in replacement for NDK. Most likely not. http://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-325667-1.tgz

On Thu, Mar 1, 2018 at 5:47 PM, quanyun wei notifications@github.com wrote:

I follow this guide https://github.com/google/sanitizers/wiki/ AddressSanitizerOnAndroidO http://AddressSanitizerOnAndroidO to complete configuration of my project, copy the libclang_rt.asan-arm-android.so and wrap.sh to the native libraries directory. But when I run my app, it cannot run and I get these logs

[ 03-01 21:33:26.418 22003:22003 I/ ] ==22003==Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING. [ 03-01 21:33:26.418 22003:22003 I/ ] [ 03-01 21:33:26.453 22003:22003 I/ ] ==22003==Process memory map follows: [ 03-01 21:33:26.453 22003:22003 I/ ] [ 03-01 21:33:26.454 22003:22003 I/ ] 0x12c00000-0x52c00000 /dev/ashmem/dalvik-main space (region space) (deleted) [ 03-01 21:33:26.454 22003:22003 I/ ] [ 03-01 21:33:26.454 22003:22003 I/ ] 0x703b0000-0x70596000 /data/dalvik-cache/arm/system@framework@boot.art [ 03-01 21:33:26.454 22003:22003 I/ ] [ 03-01 21:33:26.454 22003:22003 I/ ] 0x70596000-0x70653000 /data/dalvik-cache/arm/system@framework@boot-core-libart.art [ 03-01 21:33:26.454 22003:22003 I/ ]

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/google/sanitizers/issues/921, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZuStkmGDngd_oT7ShNIaPUpGyfp76wks5taKSrgaJpZM4SZRtV .

wqycsu commented 6 years ago

@eugenis Thanks, but do you mean it's not sure when the ndk team can fix this issue?

eugenis commented 6 years ago

LLVM fix is in r318666, eventually it will be included in the NDK. Not sure when.

On Sun, Mar 4, 2018 at 5:51 PM, quanyun wei notifications@github.com wrote:

@eugenis https://github.com/eugenis Thanks, but do you mean it's not sure when the ndk team can fix this issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/sanitizers/issues/921#issuecomment-370287827, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZuSqDu4u9X3aLnAcedFHvcLlRfU41_ks5tbJoRgaJpZM4SZRtV .

morehouse commented 6 years ago

@eugenis: Can we close this?