Bug 1432298 - Make sm-fuzzing build ready for libfuzzer. r?sfink draft
authorChristian Holler <choller@mozilla.com>
Mon, 22 Jan 2018 21:23:47 +0100
changeset 723344 f736faf57486795da35ddd4917579c0422a84c67
parent 721623 583fd2e84a45f3bcdc1bc1c2a75b80b2a95c66ff
child 746838 508e0e6fa4a15639723e22e2ba0a66e31e0107e7
push id96404
push usercholler@mozilla.com
push dateTue, 23 Jan 2018 00:40:17 +0000
reviewerssfink
bugs1432298
milestone59.0a1
Bug 1432298 - Make sm-fuzzing build ready for libfuzzer. r?sfink This patch disables the stdcxx-compat check for the sm-fuzzing build which requires patching autospider as well. Furthermore, it switches the build to linux64-clang-6-pre because the older clang 3.9 does not support trace-pc instrumentation. Finally, it excludes fuzzing parts from the vanilla allocation check. MozReview-Commit-ID: FdhCIFdUore
config/check_vanilla_allocations.py
js/src/devtools/automation/autospider.py
js/src/devtools/automation/variants/fuzzing
taskcluster/ci/spidermonkey/linux.yml
--- a/config/check_vanilla_allocations.py
+++ b/config/check_vanilla_allocations.py
@@ -134,16 +134,20 @@ def main():
         if 'stdc++compat' in filename:
             continue
 
         # The memory allocator code contains calls to memalign. These are ok, so
         # we whitelist them.
         if "_memory_" in filename:
             continue
 
+        # Ignore the fuzzing code imported from m-c
+        if "Fuzzer" in filename:
+            continue
+
         fn = m.group(2)
         if filename == 'jsutil.o':
             jsutil_cpp.add(fn)
         else:
             # An allocation is present in a non-special file.  Fail!
             fail("'" + fn + "' present in " + filename)
             # Try to give more precise information about the offending code.
             emit_line_info = True
--- a/js/src/devtools/automation/autospider.py
+++ b/js/src/devtools/automation/autospider.py
@@ -271,17 +271,17 @@ if word_bits == 32:
             sse_flags = '-msse -msse2 -mfpmath=sse'
         env['CCFLAGS'] = '{0} {1}'.format(env.get('CCFLAGS', ''), sse_flags)
         env['CXXFLAGS'] = '{0} {1}'.format(env.get('CXXFLAGS', ''), sse_flags)
 else:
     if platform.system() == 'Windows':
         CONFIGURE_ARGS += ' --target=x86_64-pc-mingw32 --host=x86_64-pc-mingw32'
 
 if platform.system() == 'Linux':
-    CONFIGURE_ARGS += ' --enable-stdcxx-compat'
+    CONFIGURE_ARGS = '--enable-stdcxx-compat ' + CONFIGURE_ARGS
 
 # Timeouts.
 ACTIVE_PROCESSES = set()
 
 
 def killall():
     for proc in ACTIVE_PROCESSES:
         proc.kill()
--- a/js/src/devtools/automation/variants/fuzzing
+++ b/js/src/devtools/automation/variants/fuzzing
@@ -1,10 +1,10 @@
 {
-    "configure-args": "--enable-fuzzing --enable-debug-symbols='-gline-tables-only -gdwarf-2' --disable-jemalloc --enable-address-sanitizer --enable-ctypes --enable-nspr-build",
+    "configure-args": "--enable-fuzzing --enable-debug-symbols='-gline-tables-only -gdwarf-2' --disable-jemalloc --disable-stdcxx-compat --enable-address-sanitizer --enable-ctypes --enable-nspr-build",
     "optimize": true,
     "debug": false,
     "compiler": "clang",
     "env": {
         "JITTEST_EXTRA_ARGS": "--jitflags=none",
         "JSTESTS_EXTRA_ARGS": "--jitflags=none",
         "LLVM_SYMBOLIZER": "{TOOLTOOL_CHECKOUT}/clang/bin/llvm-symbolizer",
         "ASAN_SYMBOLIZER_PATH": "{TOOLTOOL_CHECKOUT}/clang/bin/llvm-symbolizer"
--- a/taskcluster/ci/spidermonkey/linux.yml
+++ b/taskcluster/ci/spidermonkey/linux.yml
@@ -160,8 +160,12 @@ sm-fuzzing-linux64/opt:
     description: "Spidermonkey Fuzzing"
     index:
         job-name: sm-fuzzing-linux64
     treeherder:
         platform: linux64/opt
         symbol: SM-tc(f)
     run:
         spidermonkey-variant: fuzzing
+    toolchains:
+        - linux64-clang-6-pre
+        - linux64-gcc
+        - linux64-rust