Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V8 crash on Android 32-bit device #434

Open
DeekshaGunjal opened this issue Jul 1, 2020 · 2 comments
Open

V8 crash on Android 32-bit device #434

DeekshaGunjal opened this issue Jul 1, 2020 · 2 comments

Comments

@DeekshaGunjal
Copy link

I had built v8 for Android following the documentation : https://v8.dev/docs/cross-compile-arm

I specifically needed the v8_monolith.a archive library to use in an ongoing android project. Also, I needed to build it with NDK version 21, which is not the one that we get in //third_party/android_ndk directory of v8 . So i downloaded the NDKr21 and copied the NDK folder to //third_party/android_ndk folder and removed r20 version that was there so that V8 uses NDKr21 while building.

After building for arm64-v8a and copying the v8_monolith.a library to the android project, it was working fine. But after building it for arm and copying the library again, running the app, the app is getting crashed. So i build v8 for arm in debug mode. For arm abi , the following arguments were used:

target_os = "android"

is_debug = true

is_component_build = false

target_cpu = "arm"

v8_target_cpu = "arm"

v8_enable_pointer_compression = false

clang_use_chrome_plugins = false

v8_monolithic=true

v8_use_external_startup_data=false

symbol_level=2

v8_enable_i18n_support=false

and then building using command ninja -C out.gn/arm.release v8_monolith -vv

It turns out that it is working fine for arm64-v8a and x86_64 ( basically 64-bit ) and crashing for x86 and arm ( 32-bit).

The logcat output after running on a device supporting armeabi-v7a is :
v8crash

I have linux-x86_64 machine.

Is there any argument required for building and running v8 on 32-bit android devices? What am i doing wrong here?

@michaelcplusplus
Copy link

I have the same problem with NDK 20 and V8 8.9
Is there a solution to this problem?

@AlessandroFlorio
Copy link

AlessandroFlorio commented Jan 21, 2021

I had the same problem with NDK 20 and V8 8.9 where the library linked correctly but the application crashed once started. With the following arguments V8 is loaded correctly and runs without crashing:

is_debug = false
target_os = "android"
target_cpu = "arm"
v8_target_cpu = "arm"
is_component_build = false
v8_monolithic = true
v8_use_external_startup_data = false
v8_static_library = true
use_custom_libcxx = false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants