Page MenuHomePhabricator

build: Allow to configure --with-sanitizers=fuzzer
ClosedPublic

Authored by Fabien on Dec 2 2019, 14:34.

Details

Summary

Backport of core PR15047:
https://github.com/bitcoin/bitcoin/pull/15047/files

Depends on D4588.

Test Plan
./configure --disable-ccache --with-sanitizers=fuzzer,address CC=clang CXX=clang++
cd src
make test/test_bitcoin_fuzzy

mkdir -p buildFuzzer
cd buildFuzzer
cmake -GNinja .. \
  -CCACHE=OFF \
  -DCMAKE_C_COMPILER=clang \
  -DCMAKE_CXX_COMPILER=clang++ \
  -DENABLE_SANITIZERS=fuzzer,address
ninja test_bitcoin_fuzzy

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

doc/fuzzing.md
1 ↗(On Diff #14566)

Out of the scope for this patch, but it looks like something that should be updated.

doc/fuzzing.md
1 ↗(On Diff #14566)

Yes, all the fuzzy-related files need update. I'm gonna do them all in one after I'm done with all the backports (there are not plenty) in order to avoid conflicts.

jasonbcox added a subscriber: jasonbcox.

PS: I think your test plan indentation is broken.

This revision is now accepted and ready to land.Dec 3 2019, 23:20

Rebase.
Migrate the doc to cmake.

Fabien edited the test plan for this revision. (Show Details)

Snippet of first build failure:

[11:40:40]i:		 [Bitcoin_ABC_unit_tests] init_tests.walletinit_verify_walletdir_is_not_directory
[11:40:40]i:		 [Bitcoin_ABC_unit_tests] init_tests.walletinit_verify_walletdir_is_not_relative
[11:40:40]i:		 [Bitcoin_ABC_unit_tests] init_tests.walletinit_verify_walletdir_no_trailing
[11:40:40]i:		 [Bitcoin_ABC_unit_tests] init_tests.walletinit_verify_walletdir_no_trailing2
[11:40:40]i:		 [Bitcoin_ABC_unit_tests] psbt_wallet_tests.psbt_updater_test
[11:40:40]i:		 [Bitcoin_ABC_unit_tests] psbt_wallet_tests.parse_hd_keypath
[11:40:40]i:		 [Bitcoin_ABC_unit_tests] wallet_tests.rescan
[11:40:40]i:		 [Bitcoin_ABC_unit_tests] wallet_tests.importwallet_rescan
[11:40:40]i:		 [Bitcoin_ABC_unit_tests] wallet_tests.coin_mark_dirty_immature_credit
[11:40:40]i:		 [Bitcoin_ABC_unit_tests] wallet_tests.ComputeTimeSmart
[11:40:40]i:		 [Bitcoin_ABC_unit_tests] wallet_tests.LoadReceiveRequests
[11:40:40]i:		 [Bitcoin_ABC_unit_tests] wallet_tests.ListCoins
[11:40:40]i:		 [Bitcoin_ABC_unit_tests] wallet_tests.wallet_disableprivkeys
[11:40:40]i:		 [Bitcoin_ABC_unit_tests] walletdb_tests.write_erase_name
[11:40:40]i:		 [Bitcoin_ABC_unit_tests] walletdb_tests.write_erase_purpose
[11:40:40]i:		 [Bitcoin_ABC_unit_tests] walletdb_tests.write_erase_destdata
[11:40:40]i:		 [Bitcoin_ABC_unit_tests] walletdb_tests.no_dest_fails
[11:40:40]i:		 [Bitcoin_ABC_unit_tests] wallet_crypto_tests.passphrase
[11:40:40]i:		 [Bitcoin_ABC_unit_tests] wallet_crypto_tests.encrypt
[11:40:40]i:		 [Bitcoin_ABC_unit_tests] wallet_crypto_tests.decrypt
[11:42:05] :	 [Step 1/1] Running 454 test cases...
[11:42:05] :	 [Step 1/1] 
[11:42:05] :	 [Step 1/1] Assertion occurred in a following context:
[11:42:05] :	 [Step 1/1]     ../src/test/sigcheckcount_tests.cpp:341
[11:42:05] :	 [Step 1/1] Assertion occurred in a following context:
[11:42:05] :	 [Step 1/1]     ../src/test/sigcheckcount_tests.cpp:341
[11:42:05] :	 [Step 1/1] Assertion occurred in a following context:
[11:42:05] :	 [Step 1/1]     ../src/test/sigcheckcount_tests.cpp:341
[11:42:05] :	 [Step 1/1] Assertion occurred in a following context:
[11:42:05] :	 [Step 1/1]     ../src/test/sigcheckcount_tests.cpp:341
[11:42:05] :	 [Step 1/1] Assertion occurred in a following context:
[11:42:05] :	 [Step 1/1]     ../src/test/sigcheckcount_tests.cpp:345
[11:42:05] :	 [Step 1/1] Assertion occurred in a following context:
[11:42:05] :	 [Step 1/1]     ../src/test/sigcheckcount_tests.cpp:345
[11:42:05] :	 [Step 1/1] Assertion occurred in a following context:
[11:42:05] :	 [Step 1/1]     ../src/test/sigcheckcount_tests.cpp:345
[11:42:05] :	 [Step 1/1] Assertion occurred in a following context:
[11:42:05] :	 [Step 1/1]     ../src/test/sigcheckcount_tests.cpp:345
[11:42:05] :	 [Step 1/1] Assertion occurred in a following context:
[11:42:05] :	 [Step 1/1]     ../src/test/sigcheckcount_tests.cpp:355
[11:42:05] :	 [Step 1/1] Assertion occurred in a following context:
[11:42:05] :	 [Step 1/1]     ../src/test/sigcheckcount_tests.cpp:355
[11:42:05] :	 [Step 1/1] Assertion occurred in a following context:
[11:42:05] :	 [Step 1/1]     ../src/test/sigcheckcount_tests.cpp:355
[11:42:05] :	 [Step 1/1] Assertion occurred in a following context:
[11:42:05] :	 [Step 1/1]     ../src/test/sigcheckcount_tests.cpp:355
[11:42:05] :	 [Step 1/1] Assertion occurred in a following context:
[11:42:05] :	 [Step 1/1]     ../src/test/sigcheckcount_tests.cpp:365
[11:42:05] :	 [Step 1/1] Assertion occurred in a following context:
[11:42:05] :	 [Step 1/1]     ../src/test/sigcheckcount_tests.cpp:365
[11:42:05] :	 [Step 1/1] Assertion occurred in a following context:
[11:42:05] :	 [Step 1/1]     ../src/test/sigcheckcount_tests.cpp:365
[11:42:05] :	 [Step 1/1] Assertion occurred in a following context:
[11:42:11]W:	 [Step 1/1] corrupted double-linked list
[11:42:11] :	 [Step 1/1]     ../src/test/sigcheckcount_tests.cpp:365../src/test/util_tests.cpp(1368):  [1;31;49merror: in "util_tests/test_LockDirectory": check processstatus == 0 has failed [11 != 0] [0;39;49m
[11:42:17]W:	 [Step 1/1] 
[11:42:17]W:	 [Step 1/1]  [1;31;49m*** 1 failure is detected in the test module "Bitcoin ABC unit tests with next upgrade activated"
[11:42:18]W:	 [Step 1/1]  [0;39;49m
[11:42:18]W:	 [Step 1/1] Process exited with code 201
[11:42:18]E:	 [Step 1/1] Process exited with code 201 (Step: Command Line)

Each failure log is accessible here:
Bitcoin_ABC_unit_tests_with_next_upgrade_activated: util_tests.test_LockDirectory

This revision was landed with ongoing or failed builds.Feb 10 2020, 13:28
This revision was automatically updated to reflect the committed changes.