Skip to content

Commit

Permalink
Bug 1310954 - Bring back Linux x64 debug and build ASan(+LSan+UBSan) …
Browse files Browse the repository at this point in the history
…with -O1 r=franziskus

Differential Revision: https://nss-dev.phacility.com/D99
  • Loading branch information
Tim Taubert committed Oct 18, 2016
1 parent 7203698 commit 20ef153
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 28 deletions.
39 changes: 14 additions & 25 deletions automation/taskcluster/graph/src/extend.js
Expand Up @@ -20,23 +20,14 @@ function isSanitizer(task) {

queue.filter(task => {
if (task.group == "Builds") {
// Remove extra builds on UBSan and ARM.
if (task.collection == "ubsan" || task.collection == "arm-debug") {
// Remove extra builds on {A,UB}San and ARM.
if (isSanitizer(task) || task.collection == "arm-debug") {
return false;
}

// Remove extra builds w/o libpkix for non-asan.
if (task.symbol == "noLibpkix" && task.collection != "asan") {
return false;
}

// Remove extra builds w/ clang-3.9 on ASan.
if (task.symbol == "clang-3.9" && task.collection == "asan") {
return false;
}

// Remove extra builds w/ gcc-5 on non-ASan.
if (task.symbol == "gcc-5" && task.collection != "asan") {
// Remove extra builds w/o libpkix for non-linux64-debug.
if (task.symbol == "noLibpkix" &&
(task.platform != "linux64" || task.collection != "debug")) {
return false;
}

Expand All @@ -58,9 +49,9 @@ queue.filter(task => {
}
}

// Start with BoGo and Gtests on UBSan builds.
// Filter test suites that currently fail with UBSan.
if (task.collection == "ubsan" &&
["crmf", "cipher", "fips", "merge", "smime", "ssl"].includes(task.tests)) {
["crmf", "cipher", "fips", "merge", "smime"].includes(task.tests)) {
return false;
}

Expand Down Expand Up @@ -115,6 +106,13 @@ export default async function main() {
image: LINUX_IMAGE
});

await scheduleLinux("Linux 64 (debug)", {
env: {USE_64: "1"},
platform: "linux64",
collection: "debug",
image: LINUX_IMAGE
});

await scheduleLinux("Linux 64 (debug, gyp)", {
command: [
"/bin/bash",
Expand Down Expand Up @@ -243,15 +241,6 @@ async function scheduleLinux(name, base) {
symbol: "gcc-4.8"
}));

queue.scheduleTask(merge(extra_base, {
name: `${name} w/ gcc-5`,
env: {
CC: "gcc-5",
CCC: "g++-5"
},
symbol: "gcc-5"
}));

queue.scheduleTask(merge(extra_base, {
name: `${name} w/ gcc-6.1`,
env: {
Expand Down
9 changes: 6 additions & 3 deletions automation/taskcluster/graph/src/try_syntax.js
Expand Up @@ -22,7 +22,7 @@ function parseOptions(opts) {
}

// Parse platforms.
let allPlatforms = ["linux", "linux64", "win64", "arm", "linux64-gyp"];
let allPlatforms = ["linux", "linux64", "linux64-asan", "win64", "arm", "linux64-gyp"];
let platforms = intersect(opts.platform.split(/\s*,\s*/), allPlatforms);

// If the given value is nonsense or "none" default to all platforms.
Expand Down Expand Up @@ -100,6 +100,7 @@ function filter(opts) {
let found = opts.platforms.some(platform => {
let aliases = {
"linux": "linux32",
"linux64-asan": "linux64",
"linux64-gyp": "linux64",
"win64": "windows2012-64",
"arm": "linux32"
Expand All @@ -109,12 +110,14 @@ function filter(opts) {
let keep = (task.platform == (aliases[platform] || platform));

// Additional checks.
if (platform == "arm") {
if (platform == "linux64-asan") {
keep &= coll("asan") || coll("ubsan");
} else if (platform == "arm") {
keep &= coll("arm-opt") || coll("arm-debug");
} else if (platform == "linux64-gyp") {
keep &= coll("gyp");
} else {
keep &= coll("opt") || coll("debug") || coll("asan") || coll("ubsan");
keep &= coll("opt") || coll("debug");
}

return keep;
Expand Down
6 changes: 6 additions & 0 deletions coreconf/sanitizers.mk
Expand Up @@ -23,7 +23,13 @@ LDFLAGS += $(SANITIZER_LDFLAGS)
# frame pointers even with this option.)
SANITIZER_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls

ifdef BUILD_OPT
# You probably want to be able to get debug info for failures, even with an
# optimized build.
OPTIMIZER += -g
else
# Try maintaining reasonable performance, ASan and UBSan slow things down.
OPTIMIZER += -O1
endif

endif

0 comments on commit 20ef153

Please sign in to comment.