Backed out changeset d1bcd80c9a73 (bug 1455593) for spidermonkey failures on testBinASTReader.cpp:235 on a CLOSED TREE
authorGurzau Raul <rgurzau@mozilla.com>
Fri, 20 Apr 2018 18:13:52 +0300
changeset 468202 f39f926f02fbb52667d5a90f34ff69ae7612af89
parent 468201 d7a44870dd575ed9f8ef2859a4a3450c96ebbd39
child 468203 41d1450450f7e56f31ff34b424c722922eb520fe
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1455593
milestone61.0a1
backs outd1bcd80c9a73a647a583958bef60816ae90d3d6b
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset d1bcd80c9a73 (bug 1455593) for spidermonkey failures on testBinASTReader.cpp:235 on a CLOSED TREE
js/src/frontend/BinTokenReaderBase.h
js/src/fuzz-tests/testBinASTReader.cpp
js/src/moz.build
--- a/js/src/frontend/BinTokenReaderBase.h
+++ b/js/src/frontend/BinTokenReaderBase.h
@@ -104,24 +104,19 @@ class MOZ_STACK_CLASS BinTokenReaderBase
     MOZ_MUST_USE bool matchConst(const char (&value)[N], bool expectNul) {
         MOZ_ASSERT(N > 0);
         MOZ_ASSERT(value[N - 1] == 0);
         MOZ_ASSERT(!cx_->isExceptionPending());
 
         if (current_ + N - 1 > stop_)
             return false;
 
-#ifndef FUZZING
         // Perform lookup, without side-effects.
-        // For fuzzing, we disable this check to avoid spending unnecessary
-        // time on getting the constants right. Instead, the constant fields
-        // may contain any data for such builds.
         if (!std::equal(current_, current_ + N + (expectNul ? 0 : -1)/*implicit NUL*/, value))
             return false;
-#endif
 
         // Looks like we have a match. Now perform side-effects
         current_ += N + (expectNul ? 0 : -1);
         updateLatestKnownGood();
         return true;
     }
 
     void updateLatestKnownGood();
@@ -148,9 +143,9 @@ class MOZ_STACK_CLASS BinTokenReaderBase
     BinTokenReaderBase(const BinTokenReaderBase&) = delete;
     BinTokenReaderBase(BinTokenReaderBase&&) = delete;
     BinTokenReaderBase& operator=(BinTokenReaderBase&) = delete;
 };
 
 } // namespace frontend
 } // namespace js
 
-#endif // frontend_BinTokenReaderBase_h
+#endif // frontend_BinTokenReaderBase_h
\ No newline at end of file
--- a/js/src/fuzz-tests/testBinASTReader.cpp
+++ b/js/src/fuzz-tests/testBinASTReader.cpp
@@ -51,17 +51,17 @@ testBinASTReaderFuzz(const uint8_t* buf,
     }
 
     js::frontend::UsedNameTracker binUsedNames(gCx);
     if (!binUsedNames.init()) {
         ReportOutOfMemory(gCx);
         return 0;
     }
 
-    js::frontend::BinASTParser<js::frontend::BinTokenReaderMultipart> reader(gCx, gCx->tempLifoAlloc(), binUsedNames, options);
+    js::frontend::BinASTParser<js::frontend::BinTokenReaderTester> reader(gCx, gCx->tempLifoAlloc(), binUsedNames, options);
 
     // Will be deallocated once `reader` goes out of scope.
     auto binParsed = reader.parse(binSource);
     RootedValue binExn(gCx);
     if (binParsed.isErr()) {
         js::GetAndClearException(gCx, &binExn);
         return 0;
     }
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -714,21 +714,19 @@ if CONFIG['JS_BUILD_BINAST']:
         'frontend/BinSource.cpp',
         'frontend/BinToken.cpp',
         'frontend/BinTokenReaderBase.cpp',
         'frontend/BinTokenReaderMultipart.cpp',
     ]
 
     # Instrument BinAST files for fuzzing as we have a fuzzing target for BinAST.
     if CONFIG['FUZZING_INTERFACES'] and CONFIG['LIBFUZZER']:
-        SOURCES['frontend/BinSource-auto.cpp'].flags += libfuzzer_flags_cmp
         SOURCES['frontend/BinSource.cpp'].flags += libfuzzer_flags_cmp
         SOURCES['frontend/BinToken.cpp'].flags += libfuzzer_flags_cmp
-        SOURCES['frontend/BinTokenReaderBase.cpp'].flags += libfuzzer_flags_cmp
-        SOURCES['frontend/BinTokenReaderMultipart.cpp'].flags += libfuzzer_flags_cmp
+        SOURCES['frontend/BinTokenReaderTester.cpp'].flags += libfuzzer_flags_cmp
 
 # Wasm code should use WASM_HUGE_MEMORY instead of JS_CODEGEN_X64
 # so that it is easy to use the huge-mapping optimization for other
 # 64-bit platforms in the future.
 
 if CONFIG['JS_CODEGEN_X64'] or CONFIG['JS_CODEGEN_ARM64']:
     DEFINES['WASM_HUGE_MEMORY'] = True