[webkit-reviews] review granted: [Bug 214346] ASAN builds of WebKit should not freeze when an EXC_RESOURCE is delivered : [Attachment 404332] proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 15 07:37:17 PDT 2020


Mark Lam <mark.lam at apple.com> has granted Tuomas Karkkainen
<tuomas.webkit at apple.com>'s request for review:
Bug 214346: ASAN builds of WebKit should not freeze when an EXC_RESOURCE is
delivered
https://bugs.webkit.org/show_bug.cgi?id=214346

Attachment 404332: proposed patch

https://bugs.webkit.org/attachment.cgi?id=404332&action=review




--- Comment #2 from Mark Lam <mark.lam at apple.com> ---
Comment on attachment 404332
  --> https://bugs.webkit.org/attachment.cgi?id=404332
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?


More information about the webkit-reviews mailing list