fix FRI benchmark and compilation with recent compilers#50
Open
kwantam wants to merge 4 commits intoscipr-lab:masterfrom
Open
fix FRI benchmark and compilation with recent compilers#50kwantam wants to merge 4 commits intoscipr-lab:masterfrom
kwantam wants to merge 4 commits intoscipr-lab:masterfrom
Conversation
in some stdlibs it's enough to include <cstdint>, but size_t is only guaranteed to be defined in cstddef. Concretely, this fixes build with gcc-11.
This function reserves some number of entries in the result vector with the intent of adding that many entries. Instead, the for loop iterates over the *size* of results (which is zero---reserve doesn't change the size'!'). This causes evaluated_contents to return a zero-length vector, which eventually bubbles up and causes a segfault in fri_iop.
there seems to be an issue with the old benchmark version with new compilers. the new version seems to work fine, though.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for the useful library!
This PR fixes a couple issues I ran into:
size_tis defined in<cstddef>. Some C++ libraries will incidentally pull this in, but that's not guaranteed. Concretely, gcc-11 complains thatsize_tis undefined. The first commit in this PR fixes that.fri_iopis broken---it segfaults; the second commit in this PR fixes it. A quick glance gives the impression that this issue has been in the codebase for a while. (To reproduce segfault: build current master branch and try to runtest_fri_optimizerorinstrument_fri_snark.instrument_fri_snark: thelocalization_parameter,num_localization_steps,num_oracles,num_interactive_repetitions, andnum_query_repetitionsarguments aren't handle properly. The third commit in this PR fixes it.benchmarkdependency breaks with newer compiler/cmake combinations. Not 100% sure what versions break it, but it seems to be an interaction between theCMAKE_CXX_STANDARDandCMAKE_CXX_STANDARD_REQUIREDcmake flags andcxx03_test.cinbenchmark. The fourth commit in this PR just updatesbenchmarkto the latest version, which appears to work correctly and fixes the issue.