[Webkit-unassigned] [Bug 203898] Add FuzzerAgent that reads predictions from a file
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Nov 19 09:30:37 PST 2019
https://bugs.webkit.org/show_bug.cgi?id=203898
--- Comment #15 from Mark Lam <mark.lam at apple.com> ---
Comment on attachment 383865
--> https://bugs.webkit.org/attachment.cgi?id=383865
proposed patch
View in context: https://bugs.webkit.org/attachment.cgi?id=383865&action=review
Drive by comment.
> Source/JavaScriptCore/runtime/VM.cpp:460
> setFuzzerAgent(makeUnique<RandomizingFuzzerAgent>(*this));
> else if (Options::useDoublePredictionFuzzerAgent())
> setFuzzerAgent(makeUnique<DoublePredictionFuzzerAgent>(*this));
> + else if (Options::useFileBasedFuzzerAgent())
> + setFuzzerAgent(makeUnique<FileBasedFuzzerAgent>(*this));
> + else if (Options::usePredictionFileCreatingFuzzerAgent())
> + setFuzzerAgent(makeUnique<PredictionFileCreatingFuzzerAgent>(*this));
Since these fuzzer agent settings are mutually exclusive, I think it would be beneficial to let the user know if more of these options are enabled at the same time rather than failing silently. I'm thinking something like this:
if (UNLIKELY(Options::useRandomizingFuzzerAgent() || Options::useDoublePredictionFuzzerAgent() || Options::useFileBasedFuzzerAgent() || Options::usePredictionFileCreatingFuzzerAgent())) {
size_t numberOfFuzzerAgentsEnabled = 0;
if (Options::useRandomizingFuzzerAgent()) {
setFuzzerAgent(makeUnique<RandomizingFuzzerAgent>(*this));
numberOfFuzzerAgentsEnabled++;
}
if (Options::useDoublePredictionFuzzerAgent()) {
setFuzzerAgent(makeUnique<DoublePredictionFuzzerAgent>(*this));
numberOfFuzzerAgentsEnabled++;
}
if (Options::useFileBasedFuzzerAgent()) {
setFuzzerAgent(makeUnique<FileBasedFuzzerAgent>(*this));
numberOfFuzzerAgentsEnabled++;
}
if (Options::usePredictionFileCreatingFuzzerAgent()) {
setFuzzerAgent(makeUnique<PredictionFileCreatingFuzzerAgent>(*this));
numberOfFuzzerAgentsEnabled++;
}
RELEASE_ASSERT_WITH_MESSAGE(numberOfFuzzerAgentsEnabled == 1, "Cannot use more than one fuzzer agent at the same time");
}
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191119/a349a98e/attachment.htm>
More information about the webkit-unassigned
mailing list