-
Notifications
You must be signed in to change notification settings - Fork 315
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::String::new_from_onebyte_const
crash on Android aarch64
#1475
Comments
It might be related to the vtable layout for one-byte consts. |
I shall say: Ouch. Mea culpa. |
I think we may just need to special case vtable layout for Android as well -- the question would be what that layout is. Perhaps the relative vtable ABI? |
Yeah; it might be as easy as applying the Windows vtable layout (only one destructor) for Android but of course the issue is testing the change. I'm thinking of a way to, at test time, verify the vtable layout so as to ensure any issues on different platforms become build time issues instead of runtime ones. |
There is test, but just skip for Android: Line 9109 in 4dd87b2
// one-byte "const" test
#[cfg(not(target_os = "android"))] |
根据上面几位大佬的讨论,似乎这个问题是和 vtable 有关,但是如何应该获得安卓的 vtable 呢? |
Can someone test if this PR fixes the crash? |
@littledivy I'm very thank you for finding the problem. I have tried to fix the crash following to your PR. The test is based on rusty_v8 v0.91.1(Because the new version could not be compiled, I will try it later). And the test code is same as above.
Before apply patch:
After apply patch:
It would not crash in this case. But I encountered some problems when compiling the new version rusty_v8, |
Thank you for verifying @AuTsing. The build failures seem unrelated to the fix. Maybe we can open another issue for that? |
Reproduce code (
rusty_v8 v0.91.1
):compile and run on Android phone (
adb shell
):crash log from
adb logcat
:deno_core
crash on Android aarch64, so I write this code for the BUG.denoland/deno_core#738
The text was updated successfully, but these errors were encountered: