[webkit-reviews] review granted: [Bug 204763] Only check each use...FuzzerAgent() option in VM constructor if any of the options are enabled. : [Attachment 384652] proposed patch.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 2 16:12:20 PST 2019
Keith Miller <keith_miller at apple.com> has granted Mark Lam
<mark.lam at apple.com>'s request for review:
Bug 204763: Only check each use...FuzzerAgent() option in VM constructor if any
of the options are enabled.
https://bugs.webkit.org/show_bug.cgi?id=204763
Attachment 384652: proposed patch.
https://bugs.webkit.org/attachment.cgi?id=384652&action=review
--- Comment #4 from Keith Miller <keith_miller at apple.com> ---
Comment on attachment 384652
--> https://bugs.webkit.org/attachment.cgi?id=384652
proposed patch.
View in context: https://bugs.webkit.org/attachment.cgi?id=384652&action=review
> Source/JavaScriptCore/runtime/Options.cpp:545
> + if (nameLength > 14 && !strncmp(name, "use", 3) &&
!strncmp(&name[nameLength -11], "FuzzerAgent", 11)) { \
I think you just need to check for 11 but it probably doesn't matter.
>>> Source/JavaScriptCore/runtime/Options.cpp:550
>>> + FOR_EACH_JSC_OPTION(CHECK_IF_USING_FUZZER_AGENT)
>>
>> This is a bit unfortunate... how about maybe adding
FOR_EACH_JSC_FUZZER_AGENT? That way you can call it here and just have
FOR_EACH_JSC_OPTION call it as well.
>
> Why? This code compiles down to one check each for the 4 use...FuzzerAgent
options. All other options are no-ops that hey optimized away. I already
verified it with a disassembler.
Yeah, I don't think this matters because clang will probably (TM) compile fold
this into a constant in production.
More information about the webkit-reviews
mailing list