FuzzedDataProvider::ConsumeEnum(), last updated in e3d2ba7c70b13a2165020e45abf02373a1e953f7 remains unused in the codebase as it requires the presence of a |kMaxValue| in the enum aliased to the largest value to be fuzzed, e.g. enum class Foo { SomeValue, OtherValue, kMaxValue = OtherValue }. It seems unlikely that we'll change the enums in the codebase for this. To make ConsumeEnum useable for us, change it to allow passing the max_value to be fuzzed in the contiguous range of {0..max_value}.
fuzz: enable passing a max value to FuzzedDataProvider::ConsumeEnum() #21855
pull jonatack wants to merge 1 commits into bitcoin:master from jonatack:ConsumeEnum-enable-passing-max-value changing 1 files +5 −6-
jonatack commented at 5:10 PM on May 4, 2021: member
-
fuzz: enable passing a max value to FuzzedDataProvider::ConsumeEnum() 26e30b8dd2
- DrahtBot added the label Tests on May 4, 2021
-
practicalswift commented at 6:52 PM on May 4, 2021: contributor
Concept ACK
Historically we've kept
FuzzedDataProvider.hin sync with upstream (LLVM'sFuzzedDataProvider.h) without any local modifications.If we cannot upstream those changes then perhaps a helper can be added to the local
src/test/fuzz/util.h? :) -
jonatack commented at 6:56 PM on May 4, 2021: member
@practicalswift That makes sense, thanks for the perspective. I'll look at doing that.
-
DrahtBot commented at 12:14 AM on May 5, 2021: member
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #21843 (p2p, rpc: enable GetAddr, GetAddresses, and getnodeaddresses by network by jonatack)
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.
-
jonatack commented at 11:15 AM on May 5, 2021: member
Closing for now.
- jonatack closed this on May 5, 2021
- DrahtBot locked this on Aug 18, 2022