Skip to content

Commit

Permalink
Bug 1246801 - Use SYS_PTRACE (features.allowPtrace) for LSan runs r=me
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Taubert committed Feb 1, 2017
1 parent 0e83c0f commit ca414b6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.
1 change: 1 addition & 0 deletions automation/taskcluster/docker-fuzz/setup.sh
Expand Up @@ -36,6 +36,7 @@ git -C clang-tmp/clang checkout HEAD scripts/update.py
clang-tmp/clang/scripts/update.py
rm -fr clang-tmp

# Generate locales.
locale-gen en_US.UTF-8
dpkg-reconfigure locales

Expand Down
17 changes: 1 addition & 16 deletions automation/taskcluster/graph/src/extend.js
Expand Up @@ -278,6 +278,7 @@ async function scheduleFuzzing() {
CC: "clang",
CCC: "clang++"
},
features: ["allowPtrace"],
platform: "linux64",
collection: "fuzz",
image: FUZZ_IMAGE
Expand Down Expand Up @@ -332,10 +333,6 @@ async function scheduleFuzzing() {
"bin/checkout.sh && nss/automation/taskcluster/scripts/fuzz.sh " +
"hash nss/fuzz/corpus/hash -max_total_time=300 -max_len=4096"
],
// Need a privileged docker container to remove detect_leaks=0.
env: {
ASAN_OPTIONS: "allocator_may_return_null=1:detect_leaks=0",
},
symbol: "Hash",
kind: "test"
}));
Expand All @@ -349,10 +346,6 @@ async function scheduleFuzzing() {
"bin/checkout.sh && nss/automation/taskcluster/scripts/fuzz.sh " +
"quickder nss/fuzz/corpus/quickder -max_total_time=300 -max_len=10000"
],
// Need a privileged docker container to remove detect_leaks=0.
env: {
ASAN_OPTIONS: "allocator_may_return_null=1:detect_leaks=0",
},
symbol: "QuickDER",
kind: "test"
}));
Expand All @@ -366,10 +359,6 @@ async function scheduleFuzzing() {
"bin/checkout.sh && nss/automation/taskcluster/scripts/fuzz.sh " +
"mpi nss/fuzz/corpus/mpi -max_total_time=300 -max_len=2048"
],
// Need a privileged docker container to remove detect_leaks=0.
env: {
ASAN_OPTIONS: "allocator_may_return_null=1:detect_leaks=0",
},
symbol: "MPI",
kind: "test"
}));
Expand All @@ -383,10 +372,6 @@ async function scheduleFuzzing() {
"bin/checkout.sh && nss/automation/taskcluster/scripts/fuzz.sh " +
"certDN nss/fuzz/corpus/certDN -max_total_time=300 -max_len=4096"
],
// Need a privileged docker container to remove detect_leaks=0.
env: {
ASAN_OPTIONS: "allocator_may_return_null=1:detect_leaks=0",
},
symbol: "CertDN",
kind: "test"
}));
Expand Down
12 changes: 9 additions & 3 deletions automation/taskcluster/graph/src/queue.js
Expand Up @@ -80,6 +80,7 @@ function parseTreeherder(def) {
}

function convertTask(def) {
let scopes = [];
let dependencies = [];

let env = merge({
Expand Down Expand Up @@ -110,19 +111,24 @@ function convertTask(def) {
payload.image = def.image;
}

if (def.artifacts) {
payload.artifacts = parseArtifacts(def.artifacts);
}

if (def.features) {
payload.features = parseFeatures(def.features);
}

if (def.artifacts) {
payload.artifacts = parseArtifacts(def.artifacts);
if (payload.features.allowPtrace) {
scopes.push("docker-worker:feature:allowPtrace");
}
}

return {
provisionerId: def.provisioner || "aws-provisioner-v1",
workerType: def.workerType || "hg-worker",
schedulerId: "task-graph-scheduler",

scopes,
created: fromNow(0),
deadline: fromNow(24),

Expand Down

0 comments on commit ca414b6

Please sign in to comment.