Skip to content
Permalink
Browse files
Bug 1316274 - Fuzzing mode: Move fuzz/ to GYP, remove Makefiles and m…
…anifests r=franziskus

Differential Revision: https://nss-review.dev.mozaws.net/D52
* * *
fixup
From ab8763469977a338a61d610ed69ef045244630f3 Mon Sep 17 00:00:00 2001

--HG--
rename : fuzz/nssfuzz/cert_target.cc => fuzz/cert_target.cc
rename : fuzz/nssfuzz/nssfuzz.cc => fuzz/nssfuzz.cc
rename : fuzz/nssfuzz/pkcs8_target.cc => fuzz/pkcs8_target.cc
rename : fuzz/nssfuzz/registry.h => fuzz/registry.h
rename : fuzz/nssfuzz/shared.h => fuzz/shared.h
rename : fuzz/nssfuzz/spki_target.cc => fuzz/spki_target.cc
  • Loading branch information
Tim Taubert committed Nov 11, 2016
1 parent c3e0471 commit 36bc203b7c91e5409b9773e2e47852cc7d0e6dd6
@@ -85,8 +85,12 @@ enable_fuzz()
gyp_params+=(-Duse_asan=1)
gyp_params+=(-Duse_ubsan=1)
gyp_params+=(-Duse_sancov=edge)

# Adding debug symbols even for opt builds.
nspr_opt+=(--enable-debug-symbols)

# Clone libFuzzer repository.
$cwd/fuzz/clone_libfuzzer.sh &>/dev/null
}

# parse command line arguments
@@ -97,7 +101,7 @@ while [ $# -gt 0 ]; do
-j) ninja_params+=(-j "$2"); shift ;;
-v) ninja_params+=(-v) ;;
--test) gyp_params+=(-Dtest_build=1) ;;
--fuzz) gyp_params+=(-Dtest_build=1 -Dfuzz=1); check_sanitizer; enable_fuzz ;;
--fuzz) gyp_params+=(-Dtest_build=1 -Dfuzz=1); enable_fuzz ;;
--scan-build) scanbuild=(scan-build) ;;
--scan-build=?*) scanbuild=(scan-build -o "${1#*=}") ;;
--opt|-o) opt_build=1 ;;

This file was deleted.

File renamed without changes.
@@ -3,7 +3,7 @@
cd $(dirname $0)
mkdir tmp/
git clone -q https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer tmp/
mv tmp/.git libFuzzer
mv tmp/.git libFuzzer/
rm -fr tmp
cd libFuzzer
git reset --hard 4333f2ca71eb7951fcafcdcb111012fbe25c5e7e

This file was deleted.

@@ -0,0 +1,33 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
{
'includes': [
'../coreconf/config.gypi',
'../cmd/platlibs.gypi'
],
'targets': [
{
'target_name': 'nssfuzz',
'type': 'executable',
'sources': [
'cert_target.cc',
'pkcs8_target.cc',
'spki_target.cc',
'nssfuzz.cc',
],
'dependencies': [
'<(DEPTH)/exports.gyp:nss_exports',
'<(DEPTH)/fuzz/libFuzzer/libFuzzer.gyp:libFuzzer'
]
}
],
'target_defaults': {
'include_dirs': [
'libFuzzer',
],
},
'variables': {
'module': 'nss',
}
}

This file was deleted.

This file was deleted.

@@ -0,0 +1,36 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
{
'includes': [
'../../coreconf/config.gypi'
],
'targets': [
{
'target_name': 'libFuzzer',
'type': 'static_library',
'sources': [
'FuzzerCrossOver.cpp',
'FuzzerDriver.cpp',
'FuzzerExtFunctionsDlsym.cpp',
'FuzzerExtFunctionsWeak.cpp',
'FuzzerIO.cpp',
'FuzzerLoop.cpp',
'FuzzerMutate.cpp',
'FuzzerSHA1.cpp',
'FuzzerTracePC.cpp',
'FuzzerTraceState.cpp',
'FuzzerUtil.cpp',
'FuzzerUtilDarwin.cpp',
'FuzzerUtilLinux.cpp',
],
'cflags': [
'-O2',
],
'cflags/': [
['exclude', '-fsanitize='],
['exclude', '-fsanitize-'],
]
}
],
}

This file was deleted.

This file was deleted.

File renamed without changes.

This file was deleted.

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -11,7 +11,3 @@ IMPORTS = nspr20/v4.8 \
RELEASE = nss

DIRS = coreconf lib cmd gtests

ifdef FUZZ
DIRS += fuzz
endif
11 nss.gyp
@@ -233,18 +233,25 @@
[ 'fuzz==1', {
'targets': [
{
'target_name': 'fuzz',
'target_name': 'fuzz_warning',
'type': 'none',
'actions': [
{
'action_name': 'warn_fuzz',
'action_name': 'fuzz_warning',
'action': ['cat', 'fuzz/warning.txt'],
'inputs': ['fuzz/warning.txt'],
'ninja_use_console': 1,
'outputs': ['dummy'],
}
],
},
{
'target_name': 'fuzz',
'type': 'none',
'dependencies': [
'fuzz/fuzz.gyp:nssfuzz',
]
},
],
}],
],

0 comments on commit 36bc203

Please sign in to comment.