Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavkor <david@adalogics.com>2020-08-20 00:02:14 +0300
committerBeth Griggs <Bethany.Griggs@uk.ibm.com>2020-10-14 03:28:40 +0300
commit9c74d4598d858684414b5886b6a7d60bf297d36e (patch)
treea893747862c1674ac4a28fda9b57239ec47937aa /node.gyp
parent768529736acd77a690934800b017c3b5f62fba13 (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.gyp43
1 files changed, 43 insertions, 0 deletions
diff --git a/node.gyp b/node.gyp
index 03f4db47acf..4a0acda56bf 100644
--- a/node.gyp
+++ b/node.gyp
@@ -1158,6 +1158,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',