diff options
author | Andrew Bartlett <abartlet@samba.org> | 2019-11-29 12:07:34 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-12-10 07:50:28 +0000 |
commit | 6f7a9e87887e50160df6a06b09d8454eef9208a1 (patch) | |
tree | 852ea570c34bbf5d7ccf793880fa0de185869e06 /lib | |
parent | 3ca76f59070020ea188bea88bece38d8c9036f59 (diff) | |
download | samba-6f7a9e87887e50160df6a06b09d8454eef9208a1.tar.gz |
lib/fuzzing: Link only the required NDR_ subsystems into ndr_fuzz_X binaries
This reduces the binary size and shows that we are linked against the correct
ndr_table_ global variable. This might help the fuzzing engine know there
is not much more of the binary to find if unreachable code is not included.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fuzzing/wscript_build | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/fuzzing/wscript_build b/lib/fuzzing/wscript_build index 25cdcd323bf..60a94cea814 100644 --- a/lib/fuzzing/wscript_build +++ b/lib/fuzzing/wscript_build @@ -43,7 +43,7 @@ bld.SAMBA_BINARY('fuzz_ldb_parse_tree', deps='fuzzing ldb', fuzzer=True) -def SAMBA_NDR_FUZZ(bld, interface): +def SAMBA_NDR_FUZZ(bld, interface, auto_deps=False): name = "fuzz_ndr_%s" % (interface.lower()) fuzz_dir = os.path.join(bld.env.srcdir, 'lib/fuzzing') fuzz_reldir = os.path.relpath(fuzz_dir, bld.path.abspath()) @@ -59,9 +59,14 @@ def SAMBA_NDR_FUZZ(bld, interface): target=fuzz_named_src, rule='cp ${SRC} ${TGT}') + if auto_deps: + deps = "talloc ndr NDR_%s" % interface.upper() + else: + deps = "ndr-table NDR_DCERPC" + bld.SAMBA_BINARY(name, source=fuzz_named_src, cflags = "-D FUZZ_PIPE_TABLE=ndr_table_%s" % interface, - deps = "ndr-table NDR_DCERPC", + deps = deps, install=False, fuzzer=True) |