Changeset 253164 in webkit
- Timestamp:
- Dec 5, 2019, 12:23:32 PM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r253144 r253164 1 2019-12-05 Mark Lam <mark.lam@apple.com> 2 3 computeIfUsingFuzzerAgent() is called before parsing command line arguments. 4 https://bugs.webkit.org/show_bug.cgi?id=204886 5 6 Reviewed by Saam Barati. 7 8 Rolling out r253015 which introduced computeIfUsingFuzzerAgent(). 9 10 * runtime/Options.cpp: 11 (JSC::Options::initialize): 12 (JSC::computeIfUsingFuzzerAgent): Deleted. 13 * runtime/Options.h: 14 (JSC::Options::isUsingFuzzerAgent): Deleted. 15 * runtime/OptionsList.h: 16 (JSC::OptionRange::operator bool const): Deleted. 17 * runtime/VM.cpp: 18 (JSC::VM::VM): 19 1 20 2019-12-04 Yusuke Suzuki <ysuzuki@apple.com> 2 21 -
trunk/Source/JavaScriptCore/runtime/Options.cpp
r253015 r253164 537 537 } 538 538 539 static void computeIfUsingFuzzerAgent()540 {541 g_jscConfig.options.isUsingFuzzerAgent = false;542 #define CHECK_IF_USING_FUZZER_AGENT(type_, name_, defaultValue_, availability_, description_) { \543 const char name[] = #name_; \544 unsigned nameLength = strlen(name); \545 if (nameLength > 14 && !strncmp(name, "use", 3) && !strncmp(&name[nameLength -11], "FuzzerAgent", 11)) { \546 if (Options::name_()) \547 g_jscConfig.options.isUsingFuzzerAgent = true; \548 } \549 }550 FOR_EACH_JSC_OPTION(CHECK_IF_USING_FUZZER_AGENT)551 #undef CHECK_IF_USING_FUZZER_AGENT552 }553 554 539 void Options::initialize() 555 540 { … … 625 610 dumpOptionsIfNeeded(); 626 611 ensureOptionsAreCoherent(); 627 computeIfUsingFuzzerAgent();628 612 629 613 #if HAVE(MACH_EXCEPTIONS) -
trunk/Source/JavaScriptCore/runtime/Options.h
r253015 r253164 98 98 static bool isAvailable(ID, Availability); 99 99 100 static bool isUsingFuzzerAgent() { return g_jscConfig.options.isUsingFuzzerAgent; }101 102 100 private: 103 101 struct ConstMetaData { -
trunk/Source/JavaScriptCore/runtime/OptionsList.h
r253015 r253164 573 573 const char* rangeString() const { return (m_state > InitError) ? m_rangeString : s_nullRangeStr; } 574 574 575 operator bool() const { return m_state != Uninitialized; }576 577 575 void dump(PrintStream& out) const; 578 576 … … 601 599 FOR_EACH_JSC_OPTION(DECLARE_OPTION) 602 600 #undef DECLARE_OPTION 603 604 bool isUsingFuzzerAgent; // This value is computed in Options::initialize().605 601 }; 606 602 -
trunk/Source/JavaScriptCore/runtime/VM.cpp
r253143 r253164 494 494 #endif // ENABLE(SAMPLING_PROFILER) 495 495 496 if (UNLIKELY(Options::isUsingFuzzerAgent())) { 497 if (Options::useRandomizingFuzzerAgent()) 498 setFuzzerAgent(makeUnique<RandomizingFuzzerAgent>(*this)); 499 if (Options::useDoublePredictionFuzzerAgent()) 500 setFuzzerAgent(makeUnique<DoublePredictionFuzzerAgent>(*this)); 501 if (Options::useFileBasedFuzzerAgent()) 502 setFuzzerAgent(makeUnique<FileBasedFuzzerAgent>(*this)); 503 if (Options::usePredictionFileCreatingFuzzerAgent()) 504 setFuzzerAgent(makeUnique<PredictionFileCreatingFuzzerAgent>(*this)); 505 } 496 if (Options::useRandomizingFuzzerAgent()) 497 setFuzzerAgent(makeUnique<RandomizingFuzzerAgent>(*this)); 498 if (Options::useDoublePredictionFuzzerAgent()) 499 setFuzzerAgent(makeUnique<DoublePredictionFuzzerAgent>(*this)); 500 if (Options::useFileBasedFuzzerAgent()) 501 setFuzzerAgent(makeUnique<FileBasedFuzzerAgent>(*this)); 502 if (Options::usePredictionFileCreatingFuzzerAgent()) 503 setFuzzerAgent(makeUnique<PredictionFileCreatingFuzzerAgent>(*this)); 506 504 507 505 if (Options::alwaysGeneratePCToCodeOriginMap())
Note:
See TracChangeset
for help on using the changeset viewer.