Bug 228990

Summary: Local debug build of WebContent crashes on launch in iOS simulator under performJITMemcpy
Product: WebKit Reporter: Alex Fioletov <Alex_fioletov>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: Alex_fioletov, ap, fpizlo, jbedard, mark.lam, saam, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Mac (Apple Silicon)   
OS: macOS 10.15   
Attachments:
Description Flags
Error in Xcode none

Description Alex Fioletov 2021-08-11 03:23:27 PDT
Created attachment 435331 [details]
Error in Xcode

I was trying to debug webkit with IOS simulator, but it crashes on start.
I followed instructions from this article. https://engineering.salesforce.com/debugging-webkit-in-hybrid-mobile-apps-2eee63a4c922.
Xcode attaches to all required processes, but before initial page from bundle is rendered, com.apple.WebKit.WebContnet process fails with EXC_BAD_ACCESS (Code=2).

- MacBook Air (M1, 2020)
- macOS Big Sur 11.5
- Xcode 12.5.1
- Simulators with iOS 14.5
- WebKit's master branch
- Test application: https://github.com/mmafrar/swift-ios-wkwebview-demo

I execute following commons to get sources and build them:

git clone git://git.webkit.org/WebKit.git WebKit 
cd WebKit
sudo Tools/Scripts/configure-xcode-for-embedded-development
./Tools/Scripts/update-webkit
Tools/Scripts/build-webkit --ios-simulator

Then I selected WebKit scheme, change paths to relative and selected test application to run. Before first page is rendered, process crashes.
The same scenario works for others with MacBook on inte
Comment 1 Jonathan Bedard 2021-08-12 11:10:10 PDT
It's the M1 part of this that's the problem. You might be able to work-around it by running everything with Rosetta in the mean time, though.
Comment 2 Alexey Proskuryakov 2021-08-12 12:38:22 PDT
rdar://77494871
Comment 3 Yusuke Suzuki 2021-09-28 16:07:23 PDT
Oops! I've opened a new bug 230920 for uploading the patch, but that will be fixed with that patch soon :) Thanks for your reporting!

*** This bug has been marked as a duplicate of bug 230920 ***