Repository navigation
Conversation
Play reports a native crash (SIGSEGV) in JIT-compiled OkHttp hostname code while building request URLs, on many arm64 devices. R8 inlines OkHttp's IDN mapping table and its large string constants into the hostname method, which ART's JIT likely miscompiles. Keeping the okhttp3.internal.idn classes leaves the table in its own class. In the R8 benchmark build the hostname method drops from 1,870 to 651 code units and no longer loads the table strings; the APK grows by 16 KB. The benchmark build starts, connects to session-lab and opens a session on the emulator, and scripts/check.sh passes. The crash itself couldn't be reproduced (x86_64 emulator, arm64 reports), so the next release's crash numbers are the proof. Part of #245 and #249
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Play reports a native crash (SIGSEGV) in JIT-compiled OkHttp hostname code while the app builds a request URL. It hits many different arm64 phones and tablets on Android 13 to 16. All the reports I retraced are from 0.8.0 (build 380). The same JIT frame also shows up in Play crash groups from builds 39, 138 and 178, which I didn't retrace. R8 inlines OkHttp's IDN mapping table into the hostname method, and that is likely what ART's JIT trips on, though nobody has pinned down the exact defect.
Now R8 keeps OkHttp's IDN classes, so the table stays in its own class.
_HostnamesCommonKt.toCanonicalHost) shrinks from 1,870 to 651 code units and no longer loads the table's three strings. Those now sit inIdnaMappingTableInstanceKt's initialiser, andIdnaMappingTableis a class again instead of being removed.The R8 benchmark build starts, connects to session-lab and opens a session on the emulator, and
scripts/check.shpasses. Nothing visible changes.Part of #245 and #249