Summary: | ASAN builds of WebKit should not freeze when an EXC_RESOURCE is delivered | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tuomas Karkkainen <tuomas.webkit> | ||||||
Component: | Platform | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | mark.lam, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | Other | ||||||||
Hardware: | Unspecified | ||||||||
OS: | macOS 10.15 | ||||||||
Attachments: |
|
Description
Tuomas Karkkainen
2020-07-15 04:37:14 PDT
Created attachment 404332 [details]
proposed patch
Comment on attachment 404332 [details] proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=404332&action=review r=me with fix. > Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:153 > + // EXC_RESOURCE on ASAN builds freezes the process for several minutes: rdar://65027596 > + if (char *disableFreezingOnExcResource = getenv("DISABLE_FREEZING_ON_EXC_RESOURCE")) { > + if (!strcasecmp(disableFreezingOnExcResource, "yes") || !strcasecmp(disableFreezingOnExcResource, "true") || !strcasecmp(disableFreezingOnExcResource, "1")) { > + int val = 1; > + int rc = sysctlbyname("debug.toggle_address_reuse", nullptr, 0, &val, sizeof(val)); > + if (rc < 0) > + WTFLogAlways("failed to set debug.toggle_address_reuse: %d\n", rc); > + else > + WTFLogAlways("debug.toggle_address_reuse is now 1.\n"); > + } > + } Can you guard this with #if ASAN_ENABLED? We don't need this for any other builds, right? Ok, will do. I was thinking other sanitizers might be affected, but looking quickly at an UBSAN build, there are no giant mappings there, so limiting it to ASAN makes sense. Created attachment 404429 [details]
proposed patch
wraps the code in #if ASAN_ENABLED as requested
Committed r264450: <https://trac.webkit.org/changeset/264450> All reviewed patches have been landed. Closing bug and clearing flags on attachment 404429 [details]. |