Skip to content

Conversation

@kwantam
Copy link

@kwantam kwantam commented Dec 10, 2021

Thanks for the useful library!

This PR fixes a couple issues I ran into:

  1. size_t is defined in <cstddef>. Some C++ libraries will incidentally pull this in, but that's not guaranteed. Concretely, gcc-11 complains that size_t is undefined. The first commit in this PR fixes that.
  2. fri_iop is 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 run test_fri_optimizer or instrument_fri_snark.
  3. commandline option parsing is broken in instrument_fri_snark: the localization_parameter, num_localization_steps, num_oracles, num_interactive_repetitions, and num_query_repetitions arguments aren't handle properly. The third commit in this PR fixes it.
  4. The benchmark dependency breaks with newer compiler/cmake combinations. Not 100% sure what versions break it, but it seems to be an interaction between the CMAKE_CXX_STANDARD and CMAKE_CXX_STANDARD_REQUIRED cmake flags and cxx03_test.c in benchmark. The fourth commit in this PR just updates benchmark to the latest version, which appears to work correctly and fixes the issue.

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.
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.

1 participant