[Webkit-unassigned] [Bug 237180] REGRESSION (iOS 15.4 beta): Unity WASM builds fail to load

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 21 13:51:29 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=237180

--- Comment #21 from Brendan Duncan <brendanduncan at gmail.com> ---
Here are some more notes from researching the bug in Unity. Memory errors are hard to figure out.

I found a specific function, and a specific chunk of code within that function, that starts the cascade of failures that result in the crash. The name of the function is GenericMetadata::InflateIfNeeded, and the previously attached builds should have symbols in their WASM files.

If I wrap that function with
#pragma clang optimize off
...
#pragma clang optimize on

Then the crash goes away. The code is normally built with -O2.

Only the iOS15.4 WASM VM has the crash.

The function is a switch statement, with small blocks of code for each case.
If I move the body of code for the case where the crash originates to its own function, the crash goes away, regardless of optimization level.

So it seems to have to do with the optimization of that switch, along with something the iOS15.4 WASM VM is doing.

If I add printf debugging to the section of code where the error occurs, then the values of what is printed can change depending on where I print it from, even though the value I'm printing shouldn't change. So, observation can change the behavior, though doesn't stop the crash. This indicates maybe some alignment issue, where the added code is shifting the alignment.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220321/8e80c68c/attachment.htm>


More information about the webkit-unassigned mailing list