fuzz: Invoking python interpreter from a C++ file #22973

issue stratospher opened this issue on September 14, 2021
  1. stratospher commented at 3:38 PM on September 14, 2021: contributor

    I'm interested in reimplementing a python version of the new ChaCha20Poly1305@Bitcoin AEAD and fuzzing it against the C++ implementation. However since it involves invoking a python interpreter from inside a C++ file, I'm confused on how to proceed.

    Possible Approaches

    1. using pipes to call the python script from the C++ file.
    2. using pybind11 to create the python C++ interface (idea from this PR). However the python to C++ code for the AEAD wouldn't be very readable here.

    Would method 1 be ok? I'd love to hear your thoughts on how to proceed.

  2. stratospher added the label Feature on Sep 14, 2021
  3. laanwj added the label Tests on Sep 14, 2021
  4. maflcko commented at 2:24 PM on August 10, 2022: member

    I think that calling into an external process disables the coverage tracking feature of fuzz engines we use (libfuzzer, afl, honggfuzz, ...). So I am not sure how useful it would be to add to this repo, as the CI-runs are based on a minimal set of inputs that reach maximal coverage. (It would still be run by google OSS-Fuzz and my fuzzing servers when generating).

    However, I am also wondering how often the code would be modified. (The number of bugs found via fuzzing is correlated to the rate of changes made to the code). So maybe just implementing whatever you find easiest somewhere out-of-tree and then running it only once after the code is merged to master should be sufficient?

    Or what about just using the recommended list of unit test vectors (if there is one) which would hopefully already cover all logic paths without the need for any fuzzing?

  5. stratospher commented at 9:41 AM on August 10, 2023: contributor
  6. stratospher closed this on Aug 10, 2023

  7. bitcoin locked this on Aug 9, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-01 15:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me