summaryrefslogtreecommitdiff
path: root/fuzz
diff options
context:
space:
mode:
authorTim Taubert <ttaubert@mozilla.com>2017-01-25 15:40:32 +0100
committerTim Taubert <ttaubert@mozilla.com>2017-01-25 15:40:32 +0100
commit584c481caa0d769271ca3d80785b9581d5bce917 (patch)
tree9d478761cee82730a036fc1a7a3aca60ad316ee5 /fuzz
parente3a880cf2326f213c814ed647f4038c594cd2302 (diff)
downloadnss-hg-584c481caa0d769271ca3d80785b9581d5bce917.tar.gz
Bug 1333361 - Fix static fuzzing builds r=franziskus
Differential Revision: https://nss-review.dev.mozaws.net/D170
Diffstat (limited to 'fuzz')
-rw-r--r--fuzz/fuzz.gyp3
-rw-r--r--fuzz/shared.h4
2 files changed, 4 insertions, 3 deletions
diff --git a/fuzz/fuzz.gyp b/fuzz/fuzz.gyp
index 94dac8b3f..1ccc9df8f 100644
--- a/fuzz/fuzz.gyp
+++ b/fuzz/fuzz.gyp
@@ -37,8 +37,9 @@
'<(DEPTH)/lib/pki/pki.gyp:nsspki',
'<(DEPTH)/lib/util/util.gyp:nssutil',
'<(DEPTH)/lib/nss/nss.gyp:nss_static',
- '<(DEPTH)/lib/pk11wrap/pk11wrap.gyp:pk11wrap',
'<(DEPTH)/lib/pkcs7/pkcs7.gyp:pkcs7',
+ # This is a static build of pk11wrap, softoken, and freebl.
+ '<(DEPTH)/lib/pk11wrap/pk11wrap.gyp:pk11wrap_static',
],
'conditions': [
['use_fuzzing_engine==0', {
diff --git a/fuzz/shared.h b/fuzz/shared.h
index 142058069..bfa4e8f52 100644
--- a/fuzz/shared.h
+++ b/fuzz/shared.h
@@ -13,8 +13,8 @@
class NSSDatabase {
public:
- NSSDatabase() { NSS_NoDB_Init(nullptr); }
- ~NSSDatabase() { NSS_Shutdown(); }
+ NSSDatabase() { assert(NSS_NoDB_Init(nullptr) == SECSuccess); }
+ ~NSSDatabase() { assert(NSS_Shutdown() == SECSuccess); }
};
size_t CustomMutate(std::vector<decltype(LLVMFuzzerCustomMutator) *> mutators,