Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fuzz: backport fixes to fuzzer errors #1012

Merged
merged 4 commits into from
Jul 1, 2021

Conversation

apoelstra
Copy link
Member

@apoelstra apoelstra commented Jun 18, 2021

apoelstra and others added 3 commits June 18, 2021 23:29
Remove the erroneous trailing newline '\n'. Also, print only the first
value to remove needless redundancy in the error message.
@apoelstra apoelstra changed the title fuzz: add missing ECCVerifyHandle to base_encode_decode fuzz: backport fixes to fuzzer errors Jun 19, 2021
@apoelstra
Copy link
Member Author

Our CI uses Bitcoin's fuzzer corpus, meaning that when they add test vectors to it that they've fixed, our CI breaks until we fix them too :).

This bug was introduced in commit
fad0867.

Unit test
Co-Authored-By: Russell Yanofsky <[email protected]>
@apoelstra apoelstra force-pushed the 2021-06--fuzztestfix branch from fd3dc5b to 0896d0a Compare June 21, 2021 14:08
@apoelstra
Copy link
Member Author

For some reason I needed to edit Marco's last commit with

diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index ec996dbe7f6..c7bb028b111 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -323,7 +323,7 @@ struct NoIncludeConfTest {
     {
         TestArgsManager test;
         test.SetupArgs({{"-includeconf", ArgsManager::ALLOW_ANY}});
-        std::array argv{"ignored", arg};
+        std::array<const char*, 2> argv{"ignored", arg};
         std::string error;
         (void)test.ParseParameters(argv.size(), argv.data(), error);
         return error;

to avoid compiler errors "missing template arguments before argv". I don't know why this is needed here but not upstream.

@apoelstra apoelstra mentioned this pull request Jun 24, 2021
@gwillen
Copy link
Contributor

gwillen commented Jun 25, 2021

Driveby quick review: utACK.

The std::array template thing appears to be a C++14 vs C++17 change. Is upstream on 17? Are we on 14 and should switch to 17?

Copy link
Contributor

@jonasnick jonasnick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not familiar with area of the code, but I can confirm that these are backports

utACK 0896d0a

@apoelstra
Copy link
Member Author

@gwillen if upstream has switched to 17, it was between 0.21 and 22.0 and we'll follow them as part of the 22.0 rebase.

@gwillen
Copy link
Contributor

gwillen commented Jun 25, 2021

@gwillen if upstream has switched to 17, it was between 0.21 and 22.0 and we'll follow them as part of the 22.0 rebase.

Oh, right, and that makes perfect sense because this is a backport. 👍

@stevenroose stevenroose merged commit bd2e2d5 into ElementsProject:master Jul 1, 2021
@apoelstra apoelstra deleted the 2021-06--fuzztestfix branch July 1, 2021 16:58
gwillen pushed a commit that referenced this pull request Jun 1, 2022
Took the non-backported version of base_encode_decode from bitcoin/bitcoin#22279
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants