clang-10 (unreleased) reports a type conversion error here
Likely root cause is https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#es46-avoid-lossy-narrowing-truncating-arithmetic-conversions
Would be solved (with quite a big hammer) by https://github.com/ethereum/solidity/issues/6900 ;-).
This currently fails the fuzzing build. Working on a (temporary) fix.
I have not been able to "hot" patch this so far. The closest I came is to remove the -Werror=conversion option here
Sadly, even I were to add -Wno-error=conversion here
it will be undone by the linked cmake because jsoncpp's -Werror=conversion follows the options supplied by CMAKE_CXX_FLAGS (see first link)
What happens if you add -DJSON_USE_INT64_DOUBLE_CONVERSION to JSONCPP_CXX_FLAGS? Even if that works, we'd need to have a close look at what that actually does, though :-).
Nice find :-)
Sadly, I cannot just pass -DJSON_USE... to JSONCPP_CXX_FLAGS because cmake-3.14 (version in the ossfuzz docker image) complains of definition not being of VAR=VALUE form, and when I do change it to the form it warns me that the passed option is not used by jsoncpp
Manually-specified variables were not used by the project: JSON_USE_INT64_DOUBLE_CONVERSION
@bshastry That sounds a bit weird... are you sure there aren't just some quotes missing which will make cmake consider it as a -D-style cmake option instead of a list of cxx flags?
Yup, the problem was missing double quotes :man_facepalming: