| Summary: | [GTK] WebKitWebProcess crashes in JavaScriptCore LinkBuffer::copyCompactAndLinkCode | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | John Ralls <jralls> |
| Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | bugs-noreply, mcatanzaro |
| Priority: | P3 | Keywords: | Gtk |
| Version: | WebKit Local Build | ||
| Hardware: | Mac (Apple Silicon) | ||
| OS: | macOS 13 | ||
| Attachments: | |||
|
Description
John Ralls
2022-12-05 17:59:10 PST
Created attachment 463900 [details]
Disassembly of platform_memcpy from the lldb debugger.
Created attachment 463901 [details]
malloc history of the segfaulting address
Created attachment 463902 [details]
First patch to build webkit on macOS
Created attachment 463903 [details]
Second patch to build WebKitGtk on macOS.
Created attachment 463904 [details]
Third patch to build WebKitGtk on macOS.
This has me stumped because I don't understand why memcpy isn't able to access the address. malloc_history shows it to be in the middle of a huge range of currently allocated memory for the process. Not sure how to help with this bug. Just wanted to say that WebKitGTK is *theoretically* supported on macOS, so you could try to upstream the non-hacky portions of your build fixes if you want. (In reply to Michael Catanzaro from comment #7) > Not sure how to help with this bug. Just wanted to say that WebKitGTK is > *theoretically* supported on macOS, so you could try to upstream the > non-hacky portions of your build fixes if you want. Very little of it is non-hacky because I don't have a deep enough understanding of the code base to do anything but hack. I attached the patches so that someone who does have a better grip on the code could see if I created the problem by doing something dumb. As for helping, you at least have better knowledge of the code base than I do and more important more contacts with the WebKit team. As I said, I don't even understand why it's crashing: It's a half-gig active allocated memory region into which memcpy wants to write 188 bytes somewhere in the middle. The 188 bytes in the destination are all 0x00. The tail of the address is always 0x4000 so it can't be alignment. Whatever it is it's a problem on aarch64 and not x86_64. What could it be? No clue. Maybe the JSC developers will know. This is fixed by back-porting https://github.com/WebKit/WebKit/commit/34d7f551c40ab7253255304e1443394d5e493333. |