Open
Description
This test was recently added in #220 and subsequently disabled on ARM (226455b) due to failing on the cross-build ARM CI targets.
I’m able to reproduce it on an arm64 Android emulator with this result in gdb:
Program received signal SIGABRT, Aborted.
0x0000007fbdee5f74 in abort () from target:/apex/com.android.runtime/lib64/bionic/libc.so
(gdb) bt
#0 0x0000007fbdee5f74 in abort () from target:/apex/com.android.runtime/lib64/bionic/libc.so
#1 0x0000007fbe2e7178 in objc_exception_throw (object=0x5555558ee0 <.objc_str_Exception>)
at eh_personality.c:261
#2 0x0000005555556a4c in main ()
at UnexpectedException.m:38
Any idea what might be going on here? Interestingly the exception hook is working fine in our app on Android ARM devices and has been for years.
Steps to reproduce with an Android emulator (on macOS ARM host, NDK paths may vary):
adb push libobjc.so /data/local/tmp
adb push Test/UnexpectedException /data/local/tmp
adb push $ANDROID_NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so /data/local/tmp
# run test
adb shell LD_LIBRARY_PATH=/data/local/tmp/ /data/local/tmp/UnexpectedException
# debug with gdb
adb push $ANDROID_NDK_ROOT/prebuilt/android-arm64/gdbserver/gdbserver /data/local/tmp
adb forward tcp:5039 tcp:5039
adb shell
> cd /data/local/tmp
> LD_LIBRARY_PATH=$PWD ./gdbserver :5039 ./UnexpectedException
# on host machine
$ANDROID_NDK_ROOT/prebuilt/darwin-x86_64/bin/gdb
> target remote :5039
> c
Metadata
Assignees
Labels
No labels