mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
test: add fuzzer for native/js string conversion
Signed-off-by: Adam Korczynski <adam@adalogics.com> PR-URL: https://github.com/nodejs/node/pull/51120 Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
This commit is contained in:
parent
65573f4864
commit
c8805b8043
2 changed files with 180 additions and 0 deletions
45
node.gyp
45
node.gyp
|
@ -1109,6 +1109,51 @@
|
|||
}],
|
||||
],
|
||||
}, # fuzz_ClientHelloParser.cc
|
||||
{ # fuzz_strings
|
||||
'target_name': 'fuzz_strings',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'<(node_lib_target_name)',
|
||||
'deps/googletest/googletest.gyp:gtest_prod',
|
||||
'deps/histogram/histogram.gyp:histogram',
|
||||
'deps/uvwasi/uvwasi.gyp:uvwasi',
|
||||
'deps/ada/ada.gyp:ada',
|
||||
],
|
||||
'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',
|
||||
'test/fuzzers/fuzz_strings.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',
|
||||
}],
|
||||
# Avoid excessive LTO
|
||||
['enable_lto=="true"', {
|
||||
'ldflags': [ '-fno-lto' ],
|
||||
}],
|
||||
],
|
||||
}, # fuzz_strings
|
||||
{
|
||||
'target_name': 'cctest',
|
||||
'type': 'executable',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue