WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
204886
computeIfUsingFuzzerAgent() is called before parsing command line arguments
https://bugs.webkit.org/show_bug.cgi?id=204886
Summary
computeIfUsingFuzzerAgent() is called before parsing command line arguments
Tuomas Karkkainen
Reported
2019-12-05 05:38:56 PST
computeIfUsingFuzzerAgent(); is called in the lambda inside Options::initialize() which is invoked at the top of CommandLine::parseArguments(). The options are only set later in CommandLine::parseArguments() at
> if (!JSC::Options::setOption(&arg[2])) {
This means that computeIfUsingFuzzerAgent(); will always determine that no FuzzerAgents are in use because at the time of the check all relevant options are still false regardless of the command line. similarly I don't believe this will ever be executed either:
> if (Options::dumpOptions()) { > printf("Command line:");
the thing that actually dumps the options with --dumpOptions is at the end.
Attachments
proposed patch.
(3.52 KB, patch)
2019-12-05 10:41 PST
,
Mark Lam
no flags
Details
Formatted Diff
Diff
proposed patch.
(3.48 KB, patch)
2019-12-05 10:46 PST
,
Mark Lam
no flags
Details
Formatted Diff
Diff
proposed patch.
(5.04 KB, patch)
2019-12-05 12:17 PST
,
Mark Lam
saam
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Mark Lam
Comment 1
2019-12-05 10:31:55 PST
(In reply to Tuomas Karkkainen from
comment #0
)
> computeIfUsingFuzzerAgent(); is called in the lambda inside > Options::initialize() which is invoked at the top of > CommandLine::parseArguments(). > > The options are only set later in CommandLine::parseArguments() at > > > if (!JSC::Options::setOption(&arg[2])) { > > This means that computeIfUsingFuzzerAgent(); will always determine that no > FuzzerAgents are in use because at the time of the check all relevant > options are still false regardless of the command line.
Will fix.
> similarly I don't believe this will ever be executed either: > > if (Options::dumpOptions()) { > > printf("Command line:"); > > the thing that actually dumps the options with --dumpOptions is at the end.
This does run but only if you use the env var JSC_dumpOptions=true.
Mark Lam
Comment 2
2019-12-05 10:41:39 PST
Created
attachment 384919
[details]
proposed patch.
Mark Lam
Comment 3
2019-12-05 10:46:23 PST
Created
attachment 384921
[details]
proposed patch.
Saam Barati
Comment 4
2019-12-05 11:03:46 PST
Comment on
attachment 384921
[details]
proposed patch. View in context:
https://bugs.webkit.org/attachment.cgi?id=384921&action=review
> Source/JavaScriptCore/ChangeLog:3 > + computeIfUsingFuzzerAgent() is called before parsing command line arguments.
can we just go back to the world where we checked all of the options individually?
Mark Lam
Comment 5
2019-12-05 12:01:11 PST
(In reply to Saam Barati from
comment #4
)
> Comment on
attachment 384921
[details]
> proposed patch. > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=384921&action=review
> > > Source/JavaScriptCore/ChangeLog:3 > > + computeIfUsingFuzzerAgent() is called before parsing command line arguments. > > can we just go back to the world where we checked all of the options > individually?
Fine. I'll roll it out.
Mark Lam
Comment 6
2019-12-05 12:17:42 PST
Created
attachment 384933
[details]
proposed patch.
Mark Lam
Comment 7
2019-12-05 12:24:08 PST
Thanks for the review. Landed in
r253164
: <
http://trac.webkit.org/r253164
>.
Radar WebKit Bug Importer
Comment 8
2019-12-05 12:25:22 PST
<
rdar://problem/57672961
>
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