Run fuzz testing test cases (bitcoin-core/qa-assets) under valgrind
.
This would have caught util: Avoid potential uninitialized read in FormatISO8601DateTime(int64_t) by checking gmtime_s/gmtime_r return value
(#18162) and similar cases.
Run fuzz testing test cases (bitcoin-core/qa-assets) under valgrind
.
This would have caught util: Avoid potential uninitialized read in FormatISO8601DateTime(int64_t) by checking gmtime_s/gmtime_r return value
(#18162) and similar cases.
Failing as intended in Travis:
0…
1Run integer with args ['valgrind', '--quiet', '--error-exitcode=1', '/home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/test/fuzz/integer', '-runs=1', '-detect_leaks=0', '/home/travis/build/bitcoin/bitcoin/ci/scratch//qa-assets/fuzz_seed_corpus/integer']
2Output: INFO: Seed: 3664174428
3INFO: Loaded 1 modules (154709 inline 8-bit counters): 154709 [0xea0bc8, 0xec681d),
4INFO: Loaded 1 PC tables (154709 PCs): 154709 [0xec6820,0x1122d70),
5INFO: 79 files found in /home/travis/build/bitcoin/bitcoin/ci/scratch//qa-assets/fuzz_seed_corpus/integer
6INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes
7INFO: seed corpus: files: 79 min: 1b max: 83b total: 5116b rss: 129Mb
8==26395== Conditional jump or move depends on uninitialised value(s)
9==26395== at 0x4F43C0A: std::ostreambuf_iterator<char, std::char_traits<char> > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::_M_insert_int<long>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, long) const (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25)
10==26395== by 0x4F501A4: std::ostream& std::ostream::_M_insert<long>(long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25)
11==26395== by 0x543C1C: formatValue<int> (tinyformat.h:358)
12==26395== by 0x543C1C: void tinyformat::detail::FormatArg::formatImpl<int>(std::ostream&, char const*, char const*, int, void const*) (tinyformat.h:543)
13==26395== by 0x532D1F: format (tinyformat.h:528)
14==26395== by 0x532D1F: tinyformat::detail::formatImpl(std::ostream&, char const*, tinyformat::detail::FormatArg const*, int) (tinyformat.h:907)
15==26395== by 0x5EE190: vformat (tinyformat.h:1054)
16==26395== by 0x5EE190: format<int, int, int> (tinyformat.h:1064)
17==26395== by 0x5EE190: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > tinyformat::format<int, int, int>(char const*, int const&, int const&, int const&) (tinyformat.h:1073)
18==26395== by 0x5EE0C0: FormatISO8601Date[abi:cxx11](long) (time.cpp:112)
19…
Will fail until #18162 is merged.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
0@@ -0,0 +1,18 @@
1+#!/usr/bin/env bash
2+#
3+# Copyright (c) 2019 The Bitcoin Core developers
4+# Distributed under the MIT software license, see the accompanying
5+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
6+
7+export LC_ALL=C.UTF-8
8+
9+export CONTAINER_NAME=ci_native_fuzz
0export CONTAINER_NAME=ci_native_fuzz_valgrind
CONTAINER_NAME
now changed. Please re-review :)
--exclude
argument to the test_runner to skip a test target (in this case --exclude integer
).
149@@ -150,7 +150,7 @@ def run_once(*, corpus, test_list, build_dir, export_coverage, use_valgrind):
150 corpus_path,
Unrelated to this pull, but it why is detect_leaks disabled?
I’d suggest to include this commit:
0commit ffff1245c11428968b71454e4ef85417d33c9893 (HEAD)
1Author: MarcoFalke <falke.marco@gmail.com>
2Date: Fri Jan 3 10:27:04 2020 -0800
3
4 test: Enable leak detection for fuzzers
5
6 This has been disabled in 16f0a186dcee563bb1000e1ffc51da87e7623bc6 for
7 no given reason.
8
9diff --git a/test/fuzz/test_runner.py b/test/fuzz/test_runner.py
10index b638e6bac6..5174e21e2a 100755
11--- a/test/fuzz/test_runner.py
12+++ b/test/fuzz/test_runner.py
13@@ -146,7 +146,6 @@ def run_once(*, corpus, test_list, build_dir, export_coverage, use_valgrind):
14 args = [
15 os.path.join(build_dir, 'src', 'test', 'fuzz', t),
16 '-runs=1',
17- '-detect_leaks=0',
18 corpus_path,
19 ]
20 if use_valgrind:
-detect_leaks=0
was required at some points to make test/fuzz/test_runner.py
pass. If that is not required any more that is great news! I’ll try if Travis is happy without it.
ACK f2472f64604a0c583f950c56e8753d0bee246388 👼
Signature:
0-----BEGIN PGP SIGNED MESSAGE-----
1Hash: SHA512
2
3ACK f2472f64604a0c583f950c56e8753d0bee246388 👼
4-----BEGIN PGP SIGNATURE-----
5
6iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
7pUiMtgv/eLFsfqh9fC/1+Xam7Wy9imO1pDZigPBciBNC65SfSHx8iOWLFaN/AoNs
8CcCvOSnjd6yPsja6uajgjiz2q83DjCGBLNKph8D03yJ+WMQt2DcLJUF52EZffSVq
9XU7w+81kmxtQMmpFQOYFb/re1ScaGJ4U1bUeISsVeHlWhljw6XinSuLFFyJW4OA0
10ahD9Wrs1VF8zypuIPEKwNTzkCjyj6eeUsZLyE7JCvJ3LXhPn/HX7dt18ErekvTFV
117IHr3shTot5aMhmDnugjmLJ/NeMO1ynFBFjFioNNzU4Ztf/PaUtTt3jxe/umfPyK
124kp4ntEOGTzSBW2WDN+qXGNwrBmToIolOnRcVyYTgwLn3kMC3x/952Om2+D8m1WI
139up5/fEd5UEHLv5GVi3BXXFwVI/qZcCvpy3IqxnDMSwi3juhIJ5QonmsIEpqv2yo
14KWriT4nvULRhFBpfmlHaDoWLIQkl5nJTeJZLlEt2/t5/ioT/hkz8Ig7wNjAowRaQ
15K3ltYj3u
16=adP/
17-----END PGP SIGNATURE-----
Timestamp of file with hash 70c5ad8b8dd4b65a0d243dba35a2ed1c733a95d5036423b9984096ba45d53f36 -
practicalswift
DrahtBot
MarcoFalke
Labels
Tests