Skip to content

Commit

Permalink
Bug 1317998 - Run cert fuzzing target on TC r=franziskus
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Taubert committed Nov 16, 2016
1 parent 7bdede5 commit fc9a785
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
17 changes: 17 additions & 0 deletions automation/taskcluster/graph/src/extend.js
Expand Up @@ -267,6 +267,8 @@ async function scheduleFuzzing() {
// bug 1316276
ASAN_OPTIONS: "allocator_may_return_null=1:detect_odr_violation=0",
UBSAN_OPTIONS: "print_stacktrace=1",
NSS_DISABLE_ARENA_FREE_LIST: "1",
NSS_DISABLE_UNLOAD: "1",
CC: "clang",
CCC: "clang++"
},
Expand Down Expand Up @@ -315,6 +317,21 @@ async function scheduleFuzzing() {
kind: "test"
}));

queue.scheduleTask(merge(base, {
parent: task_build,
name: "Cert",
command: [
"/bin/bash",
"-c",
"bin/checkout.sh && nss/automation/taskcluster/scripts/fuzz.sh " +
"cert nss/fuzz/corpus/cert -max_total_time=300"
],
// Need a privileged docker container to remove this.
env: {ASAN_OPTIONS: "detect_leaks=0"},
symbol: "SCert",
kind: "test"
}));

return queue.submit();
}

Expand Down
2 changes: 1 addition & 1 deletion automation/taskcluster/graph/src/try_syntax.js
Expand Up @@ -35,7 +35,7 @@ function parseOptions(opts) {
let aliases = {"gtests": "gtest"};
let allUnitTests = ["bogo", "crmf", "chains", "cipher", "db", "ec", "fips",
"gtest", "lowhash", "merge", "sdr", "smime", "tools",
"ssl", "mpi"];
"ssl", "mpi", "scert"];
let unittests = intersect(opts.unittests.split(/\s*,\s*/).map(t => {
return aliases[t] || t;
}), allUnitTests);
Expand Down
20 changes: 20 additions & 0 deletions automation/taskcluster/scripts/fuzz.sh
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

source $(dirname $0)/tools.sh

if [ $(id -u) = 0 ]; then
# Drop privileges by re-running this script.
exec su worker -c "$0 $*"
fi

# Fetch artifact if needed.
fetch_dist

# Clone corpus.
./nss/fuzz/clone_corpus.sh

# Fetch objdir name.
objdir=$(cat dist/latest)

# Run nssfuzz.
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:dist/$objdir/lib dist/$objdir/bin/nssfuzz $*
2 changes: 1 addition & 1 deletion fuzz/clone_libfuzzer.sh
Expand Up @@ -6,4 +6,4 @@ git clone -q https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fu
mv tmp/.git libFuzzer/
rm -fr tmp
cd libFuzzer
git reset --hard 4333f2ca71eb7951fcafcdcb111012fbe25c5e7e
git reset --hard 1b543d6e5073b56be214394890c9193979a3d7e1

0 comments on commit fc9a785

Please sign in to comment.