aboutsummaryrefslogtreecommitdiff
path: root/node.gyp
diff options
context:
space:
mode:
authordavkor <david@adalogics.com>2020-08-19 22:02:14 +0100
committerMichael Dawson <mdawson@devrus.com>2020-10-09 12:37:26 -0400
commitde7a1abfc2590fa320a0bd27142f93b463b37f50 (patch)
treedb49ddbe708b57163458bb486c1b5973f87e7104 /node.gyp
parentb4749014385e77268152d25c62f39791aed955a4 (diff)
downloadios-node-v8-de7a1abfc2590fa320a0bd27142f93b463b37f50.tar.gz
ios-node-v8-de7a1abfc2590fa320a0bd27142f93b463b37f50.tar.bz2
ios-node-v8-de7a1abfc2590fa320a0bd27142f93b463b37f50.zip
build: fuzzer that targets node::LoadEnvironment()
Refs: https://github.com/nodejs/node/pull/34761 Refs: https://github.com/nodejs/node/issues/33724 PR-URL: https://github.com/nodejs/node/pull/34844 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
Diffstat (limited to 'node.gyp')
-rw-r--r--node.gyp43
1 files changed, 43 insertions, 0 deletions
diff --git a/node.gyp b/node.gyp
index c68af49dab..2f7c8b2e04 100644
--- a/node.gyp
+++ b/node.gyp
@@ -1257,6 +1257,49 @@
}],
],
}, # fuzz_url
+ { # fuzz_env
+ 'target_name': 'fuzz_env',
+ 'type': 'executable',
+ 'dependencies': [
+ '<(node_lib_target_name)',
+ 'deps/histogram/histogram.gyp:histogram',
+ 'deps/uvwasi/uvwasi.gyp:uvwasi',
+ 'node_dtrace_header',
+ 'node_dtrace_ustack',
+ 'node_dtrace_provider',
+ ],
+ 'includes': [
+ 'node.gypi'
+ ],
+ 'include_dirs': [
+ 'src',
+ 'tools/msvs/genfiles',
+ 'deps/v8/include',
+ 'deps/cares/include',
+ 'deps/uv/include',
+ 'deps/uvwasi/include',
+ 'test/cctest',
+ ],
+ 'defines': [
+ 'NODE_ARCH="<(target_arch)"',
+ 'NODE_PLATFORM="<(OS)"',
+ 'NODE_WANT_INTERNALS=1',
+ ],
+ 'sources': [
+ 'src/node_snapshot_stub.cc',
+ 'src/node_code_cache_stub.cc',
+ 'test/fuzzers/fuzz_env.cc',
+ ],
+ 'conditions': [
+ ['OS=="linux"', {
+ 'ldflags': [ '-fsanitize=fuzzer' ]
+ }],
+ # Ensure that ossfuzz flag has been set and that we are on Linux
+ [ 'OS!="linux" or ossfuzz!="true"', {
+ 'type': 'none',
+ }],
+ ],
+ }, # fuzz_env
{
'target_name': 'cctest',
'type': 'executable',