]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
build-system: build the fuzz targets with both ASan and UBSan
authorEvgeny Vereshchagin <evvers@ya.ru>
Wed, 20 May 2020 09:33:12 +0000 (11:33 +0200)
committerEvgeny Vereshchagin <evvers@ya.ru>
Wed, 20 May 2020 14:07:13 +0000 (16:07 +0200)
Just a follow-up to https://github.com/systemd/systemd/pull/15860

meson.build
test/fuzz/meson.build

index f485616d10df13693811a01ccf23e6efc554c67e..20cb2b88a21d2ea3525c2738f52deae8a2edd505 100644 (file)
@@ -3368,6 +3368,8 @@ foreach tuple : sanitizers
                         if want_tests != 'false' and slow_tests
                                 test('@0@:@1@:@2@'.format(b, c, sanitizer),
                                      env,
+                                     env : ['UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1'],
+                                     timeout : 60,
                                      args : [exe.full_path(),
                                              join_paths(project_source_root, p)])
                         endif
index c514f57fe3d1618667bd65122f0efb01983239a5..7d61e270fd9643c86b7eecb41f986e30114a55fd 100644 (file)
@@ -1,17 +1,17 @@
 # SPDX-License-Identifier: LGPL-2.1+
 
-sanitize_address = custom_target(
-        'sanitize-address-fuzzers',
-        output : 'sanitize-address-fuzzers',
+sanitize_address_undefined = custom_target(
+        'sanitize-address-undefined-fuzzers',
+        output : 'sanitize-address-undefined-fuzzers',
         command : [meson_build_sh,
                    project_source_root,
                    '@OUTPUT@',
                    'fuzzers',
-                   '-Db_lundef=false -Db_sanitize=address',
+                   '-Db_lundef=false -Db_sanitize=address,undefined',
                    ' '.join(cc.cmd_array()),
                    cxx_cmd])
 
-sanitizers = [['address', sanitize_address]]
+sanitizers = [['address,undefined', sanitize_address_undefined]]
 
 if git.found()
         out = run_command(