v8 arm64 crash

214 views
Skip to first unread message

ibon

unread,
Dec 12, 2020, 3:10:02 PM12/12/20
to v8-users
Hi folks.

I have been trying to upgrade my app from v8 7.3 to 8.x.
The app is an android app, where an embedded v8 runs several different games.
Compilation of the libraries is successful. While armeabi-v7a and x86 libs work seamlessly, the arm64-v8a library consistently crashes. Tried this as independent apk, and universal one.
I have tried all arm64 versions from 8.0-8.6 to no avail. It just crashes on v8::Initialize, way before I get the chance to create an isolate. I have compiled arm64-v8a in debug  with symbol_level 2 but still no extra info (despite producing a 1.3Gb .a file).
Arm64 version crashes for the same code, no differences in source or compilation flags. This works just fine on v8 7.3.

Also d8 from arm64-v8a seems to work as expected. Something interesting is that if in my app I try to make a call to `V8::SetFlagsFromString("--no-logfile-per-isolate")`, all 4 apk (each arch+universal) crash calling `ComputeFlagListHash`.

Any help would be much appreciated.

Here is part of the backtrace:

#00 pc 0000000000083360  /apex/com.android.runtime/lib64/bionic/libc.so (abort+176) (BuildId: 13817077d0d892b63e2f982cf91d02fa)

#01 pc 000000000154cbac  /data/app/com.spellington-93FqGE_W1PVNPtj0UZTaKw==/lib/arm64/libspellington.so (v8::base::OS::Abort()+20) (BuildId: 320b658caa35a53fa837cad940c9749f48c0d146)

#02 pc 0000000001545b04  /data/app/com.spellington-93FqGE_W1PVNPtj0UZTaKw==/lib/arm64/libspellington.so (V8_Fatal(char const*, int, char const*, ...)+376) (BuildId: 320b658caa35a53fa837cad940c9749f48c0d146)

#03 pc 0000000000814e38  /data/app/com.spellington-93FqGE_W1PVNPtj0UZTaKw==/lib/arm64/libspellington.so (v8::V8::Initialize(int)+72) (BuildId: 320b658caa35a53fa837cad940c9749f48c0d146) 
...

Here is my args.gn flags:

android_unstripped_runtime_outputs = false
is_component_build = false
is_debug = true
symbol_level = 2
target_cpu = "arm64"
target_os = "android"
use_goma = false
v8_use_external_startup_data = false
v8_enable_i18n_support= false
v8_android_log_stdout = true
v8_static_library = true
v8_monolithic = true

Here my android.mk flags:
LOCAL_CFLAGS := -std=c++14 

Thanks.
- i

Jakob Kummerow

unread,
Dec 16, 2020, 4:16:59 PM12/16/20
to v8-users
Wild guess: try searching for -DV8_COMPRESS_POINTERS in the archives of this list.

ibon

unread,
Dec 17, 2020, 5:30:07 PM12/17/20
to v8-users
Hi Jakob, 
thank you so much for the prompt reply.
I dig deeper into this issue, just to find out a libc++ mismatch between v8 and ndk.
Everything looks good now. 
Again, thanks.

- i

Reply all
Reply to author
Forward
0 new messages