diff options
author | davkor <david@adalogics.com> | 2020-08-20 00:02:14 +0300 |
---|---|---|
committer | Michael Dawson <mdawson@devrus.com> | 2020-10-09 19:37:26 +0300 |
commit | de7a1abfc2590fa320a0bd27142f93b463b37f50 (patch) | |
tree | db49ddbe708b57163458bb486c1b5973f87e7104 /node.gyp | |
parent | b4749014385e77268152d25c62f39791aed955a4 (diff) |
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.gyp | 43 |
1 files changed, 43 insertions, 0 deletions
@@ -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', |