fuzz: pull the latest FuzzedDataProvider.h from upstream #34396

pull b-l-u-e wants to merge 1 commits into bitcoin:master from b-l-u-e:refactor-modernize-fuzzed-data-provider-with-constexpr changing 1 files +3 −4
  1. b-l-u-e commented at 10:41 pm on January 23, 2026: contributor

    Pulls down the latest version of https://github.com/llvm/llvm-project/blob/main/compiler-rt/include/fuzzer/FuzzedDataProvider.h, after https://github.com/llvm/llvm-project/pull/177794 was merged upstream.

    just a note that in C++20 unsigned‑to‑signed conversion is no longer implementation defined so this is effectively a no‑op in Core and this is mainly an upstream cleanup update

  2. DrahtBot added the label Refactoring on Jan 23, 2026
  3. DrahtBot commented at 10:41 pm on January 23, 2026: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34396.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK fanquake

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

  4. l0rinc commented at 10:47 pm on January 23, 2026: contributor
  5. b-l-u-e commented at 11:06 pm on January 23, 2026: contributor
  6. b-l-u-e marked this as a draft on Jan 23, 2026
  7. b-l-u-e closed this on Jan 23, 2026

  8. b-l-u-e commented at 8:36 pm on January 24, 2026: contributor
  9. fanquake reopened this on Jan 30, 2026

  10. fanquake commented at 11:42 am on January 30, 2026: member

    Opened a PR: https://github.com/llvm/llvm-project/pull/177794

    This has been merged upstream.

  11. fanquake commented at 11:44 am on January 30, 2026: member
    Can you update the commit message and PR description to something like “fuzz: pull the latest FuzzedDataProvider.h from upstream”. As well as check that there aren’t any other changes that need pulling.
  12. fanquake renamed this:
    refactor: modernize FuzzedDataProvider with if constexpr and safe casts
    fuzz: pull the latest FuzzedDataProvider.h from upstream
    on Jan 30, 2026
  13. b-l-u-e commented at 12:05 pm on January 30, 2026: contributor

    Can you update the commit message and PR description to something like “fuzz: pull the latest FuzzedDataProvider.h from upstream”. As well as check that there aren’t any other changes that need pulling.

    Thank you for the title change..I will make change to commit after some hours

  14. fuzz: pull latest FuzzedDataProvider.h from upstream dfb9364609
  15. b-l-u-e force-pushed on Jan 31, 2026
  16. b-l-u-e marked this as ready for review on Jan 31, 2026
  17. b-l-u-e commented at 7:37 am on February 2, 2026: contributor

    Can you update the commit message and PR description to something like “fuzz: pull the latest FuzzedDataProvider.h from upstream”. As well as check that there aren’t any other changes that need pulling.

    Updated the commit message

  18. fanquake commented at 9:49 am on February 2, 2026: member
    ACK dfb93646093f8d71be455fc95e2e06ff73fb9211 - updated the PR description.
  19. fanquake merged this on Feb 2, 2026
  20. fanquake closed this on Feb 2, 2026

  21. l0rinc commented at 11:27 am on February 2, 2026: contributor

    post-merge ACK dfb93646093f8d71be455fc95e2e06ff73fb9211

    Makes the unsigned-to-signed comparison explicit, switches to if constexpr + removes some leftover TODOs.

    Current https://github.com/bitcoin/bitcoin/blob/master/src/test/fuzz/FuzzedDataProvider.h is exactly the same as https://raw.githubusercontent.com/llvm/llvm-project/refs/heads/main/compiler-rt/include/fuzzer/FuzzedDataProvider.h (except for the trailing newline).


    Note: my understanding is that the updated code is most likely dead in Core since unsigned-to-signed conversion is no longer implementation-defined in C++20 according to https://en.cppreference.com/w/cpp/language/implicit_conversion.html#Integral_conversions:

    If the destination type is signed, the value does not change if the source integer can be represented in the destination type. Otherwise the result is implementation-defined(until C++20)the unique value of the destination type equal to the source value modulo 2n where n is the number of bits used to represent the destination type(since C++20) (note that this is different from signed integer arithmetic overflow, which is undefined).

    But since this has to match upstream, it’s fine - but I think it should have been mentioned in the PR. Q: I understand that this isn’t a risky change, but was it urgent that we had to merge it without any other ACKs in this repo?

  22. b-l-u-e commented at 10:31 am on February 4, 2026: contributor

    post-merge ACK dfb9364

    Makes the unsigned-to-signed comparison explicit, switches to if constexpr + removes some leftover TODOs.

    Current https://github.com/bitcoin/bitcoin/blob/master/src/test/fuzz/FuzzedDataProvider.h is exactly the same as https://raw.githubusercontent.com/llvm/llvm-project/refs/heads/main/compiler-rt/include/fuzzer/FuzzedDataProvider.h (except for the trailing newline).

    Note: my understanding is that the updated code is most likely dead in Core since unsigned-to-signed conversion is no longer implementation-defined in C++20 according to https://en.cppreference.com/w/cpp/language/implicit_conversion.html#Integral_conversions:

    If the destination type is signed, the value does not change if the source integer can be represented in the destination type. Otherwise the result is implementation-defined(until C++20)the unique value of the destination type equal to the source value modulo 2n where n is the number of bits used to represent the destination type(since C++20) (note that this is different from signed integer arithmetic overflow, which is undefined).

    But since this has to match upstream, it’s fine - but I think it should have been mentioned in the PR.

    Updated the PR description to call out the C++20 conversion semantics and that this is mainly an upstream cleanup sync. Thanks for the review


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-03-04 00:13 UTC

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