crash when launching WebView with thinLTO |
||||||
Issue descriptionWhen building x86 SystemWebview with "is_cfi=true", thinLTO is enabled by "-flto=thin". When any apk loads the WebView, it will crash Steps to reproduce: (1)enable is_cfi=true when building system_webview_apk (2)install system_webview_apk (3)launch test apk to load SystemWebview (4)webview crash Expected result: no crash Actual result: I/DEBUG ( 154): ABI: 'x86' I/DEBUG ( 154): pid: 1742, tid: 1774, name: Chrome_IOThread >>> com.example.yangjin.mywebviewapp <<< I/DEBUG ( 154): signal 4 (SIGILL), code 2 (ILL_ILLOPN), fault addr 0x66779011 I/DEBUG ( 154): eax 695d9e04 ebx 696c361c ecx 0000002b edx 00000800 I/DEBUG ( 154): esi 00000000 edi 62435230 I/DEBUG ( 154): xcs 00000073 xds 0000007b xes 0000007b xfs 0000007f xss 0000007b I/DEBUG ( 154): eip 66779011 ebp 62435278 esp 624351e0 flags 00210246 I/DEBUG ( 154): I/DEBUG ( 154): backtrace: I/DEBUG ( 154): #00 pc 00a39011 /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #01 pc 010d4f00 /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #02 pc 00a09f90 /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #03 pc 00a09a89 /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #04 pc 00a0f44d /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #05 pc 00a0f184 /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #06 pc 00a09a89 /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #07 pc 00a0882a /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #08 pc 00a08c81 /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #09 pc 00a08c09 /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #10 pc 00a091aa /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #11 pc 00a08f9b /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #12 pc 00a09013 /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #13 pc 00a17225 /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #14 pc 00a17304 /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #15 pc 0013529d /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #16 pc 00156a5d /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #17 pc 00157538 /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #18 pc 00159cb5 /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #19 pc 001567ac /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #20 pc 001ad11d /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #21 pc 01211ff7 /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #22 pc 01212281 /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #23 pc 001ad2e1 /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #24 pc 001a68cc /data/app/com.android.webview-1/lib/x86/libwebviewchromium.so I/DEBUG ( 154): #25 pc 000309d9 /system/lib/libc.so (__pthread_start(void*)+57) I/DEBUG ( 154): #26 pc 0002bafa /system/lib/libc.so (__start_thread+26) I/DEBUG ( 154): #27 pc 00013336 /system/lib/libc.so (__bionic_clone+70)
,
May 4 2018
hong.zheng@ -- Thanks for reporting this issue. Could you please share the sample APK file through which the issue can be reproduced. Also please share the device details including OS version, Chrome version and screen cast for better understanding. This would help us in reproducing and triaging the issue further. Thanks!
,
May 4 2018
This isn't that kind of issue. I'll check into this.
,
May 4 2018
It'd be helpful if you could symbolise this stack so we don't have to try to reproduce this on a device? pcc@, it looks like enabling thinLTO on x86 android is an issue - is this something we're currently planning to do on our end?
,
May 4 2018
Given that it's a SIGILL I suspect that the issue is specific to CFI rather than ThinLTO. For now we're only planning to enable ThinLTO.
,
May 4 2018
Ah, ok. Can you test with just LTO enabled, as well, then?
,
May 4 2018
,
May 5 2018
thanks torne@ and pcc@ for your comments. I will try just thinLTO enabled with use_thin_lto=true
,
May 7 2018
when building with use_thin_lto=true, webview can load webpages. Does it mean thinLTO is enabled successfully?
,
May 7 2018
Yes, I would assume so. So, this is an issue with CFI specifically, which we aren't currently planning to enable as pcc@ says. It would still be helpful if you can symbolise the stack you see; the above output is not useful. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by pnangunoori@chromium.org
, May 4 2018