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
--- 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