Closed JerryWang-0 closed 1 month ago
r27 is current, not r26 ... but asan isn't really supported anymore anyway. you'll want to use hwasan. it's better in every way: https://developer.android.com/ndk/guides/hwasan
@enh-google It seems that this problem started to occur in r25 and also exists in r27. Depending on the Android system version, we may use hwasan or asan. hwasan is only supported starting from Android 10.
Description
We have a Native so library, and sometimes we need to enable ASAN to locate memory problems. The Native so library will be integrated into the flutter demo as a flutter plugin. We recently upgraded NDK from r21e to r25c. If ASAN is enabled, the demo will not start. We tried upgrading ndk to r26b, and the problem still exists
test case: https://github.com/JerryWang-0/TestAsan device: OnePlus9, Android14
logcat backtrace: Process name is /system/bin/app_process64 -Xcompiler-option --generate-mini-debug-info /system/bin --application --nice-name=com.example.test_library_example com.android.internal.os.WrapperInit 74 34 android.app.ActivityThread seq=3577, not key_process keyProcess: 0
Build fingerprint: 'OnePlus/OnePlus9_CH/OnePlus9:14/UKQ1.230924.001/R.1695bcd-5150_1:user/release-keys' Revision: '0' ABI: 'arm64' Timestamp: 2024-09-26 14:22:21.005211418+0800 Process uptime: 1s Cmdline: /system/bin/app_process64 -Xcompiler-option --generate-mini-debug-info /system/bin --application --nice-name=com.example.test_library_example com.android.internal.os.WrapperInit 74 34 android.app.ActivityThread seq=3577 pid: 12072, tid: 12072, name: app_process64 >>> /system/bin/app_process64 <<< uid: 10586 signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000000 Cause: null pointer dereference x0 000000704b7fc508 x1 0000007fdb33ed08 x2 000000704b87321c x3 0000000000000000 x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 0000000000000000 x8 0000000000000000 x9 0000000000000000 x10 0000000000000001 x11 000000000000003b x12 0000007059cf98b9 x13 0000000000000000 x14 0000000000000000 x15 0000000000000000 x16 000000704b7f7768 x17 000000704755ba50 x18 000000705a6c2000 x19 000000704b7fc508 x20 000000704b87321c x21 0000007fdb33ed08 x22 0000007059cff000 x23 0000000000000001 x24 000000705aec6000 x25 000000705aec61e8 x26 0000000000000006 x27 000000705aec6160 x28 0000000000000000 x29 0000007fdb33ecc0 lr 000000704755ba90 sp 0000007fdb33ecb0 pc 0000000000000000 pst 0000000000001000 19 total frames backtrace:
00 pc 0000000000000000
Affected versions
r26
Canary version
No response
Host OS
Mac
Host OS version
macOS14.5
Affected ABIs
arm64-v8a
Build system
ndk-build
Other build system
No response
minSdkVersion
21
Device API level
No response