WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
290066
Use mach_vm_remap instead of mach_vm_map to set up permanent mapping for g_config
https://bugs.webkit.org/show_bug.cgi?id=290066
Summary
Use mach_vm_remap instead of mach_vm_map to set up permanent mapping for g_co...
David Degazio
Reported
2025-03-19 14:25:52 PDT
rdar://147347736
Currently in order to set up a permanent memory mapping for g_config on PLATFORM(COCOA), we use mach_vm_map to map over the g_config array with new flags. But because this is creating a new mapping, and not remapping the existing memory, this has the effect of zeroing the g_config array. This is fine so long as this occurs before any nontrivial config information is written to g_config, but since g_config is used by WebKit components that could conceptually be used independently of WTF, such as the Gigacage in bmalloc, we should avoid clearing any initialization information already in the array. To accomplish this, we can use the mach_vm_remap syscall to apply the new permanent mapping flags without destroying the previous data.
Attachments
Add attachment
proposed patch, testcase, etc.
David Degazio
Comment 1
2025-03-19 15:02:45 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/42713
EWS
Comment 2
2025-03-20 13:26:04 PDT
Committed
292440@main
(153af8646bb8): <
https://commits.webkit.org/292440@main
> Reviewed commits have been landed. Closing PR #42713 and removing active labels.
EWS
Comment 3
2025-03-20 19:12:04 PDT
Committed
289651.302@safari-7621-branch
(aea3c11b13d5): <
https://commits.webkit.org/289651.302@safari-7621-branch
> Reviewed commits have been landed. Closing PR #2846 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug