fuzz: restrict fopencookie usage to Linux & FreeBSD #29529

pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:no_fopencookie_on_openbsd changing 1 files +1 −1
  1. fanquake commented at 7:45 pm on March 1, 2024: member

    Should fix the GCC compilation portion of #29517 (comment).

    See also: https://www.gnu.org/software/gnulib/manual/html_node/fopencookie.html.

  2. DrahtBot commented at 7:45 pm on March 1, 2024: contributor

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

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK TheCharlatan
    Concept ACK theuni
    Ignored review m3dwards

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  3. DrahtBot added the label Tests on Mar 1, 2024
  4. fanquake requested review from theuni on Mar 2, 2024
  5. fanquake requested review from TheCharlatan on Mar 2, 2024
  6. m3dwards commented at 4:03 pm on March 4, 2024: contributor

    ACK https://github.com/bitcoin/bitcoin/pull/29529/commits/a07206a82b809c5f59a9daa66192ac5f75541b2f

    As it seems fopencookie is only available for glibc on linux it makes sense to add the __linux__ macro definition check.

    Something we could look into another time is also using funopen function which is roughly comparable to fopencookie but works on BSD variants including MacOS.

    Tested using FUZZ=buffered_file src/test/fuzz/fuzz on Debian 12 x86.

  7. theuni commented at 0:18 am on March 5, 2024: member

    Hmm, I’m not sure I’d trust the gnulib docs on this one. If nothing else, it seems to be supported on freebsd as well.. So I’d say either:

    • gnusource && (linux || freebsd)
    • gnusource && (!android && !openbsd)
  8. fanquake force-pushed on Mar 5, 2024
  9. fanquake commented at 4:27 pm on March 5, 2024: member

    So I’d say either:

    I wanted to avoid having to pull this out into configure. So happy to just go with linux || freebsd. Sent up patch upstream that may get the gnulib docs fixed: https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00038.html.

  10. fanquake force-pushed on Mar 5, 2024
  11. DrahtBot added the label CI failed on Mar 5, 2024
  12. DrahtBot commented at 4:51 pm on March 5, 2024: contributor

    🚧 At least one of the CI tasks failed. Make sure to run all tests locally, according to the documentation.

    Possibly this is due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    Leave a comment here, if you need help tracking down a confusing failure.

    Debug: https://github.com/bitcoin/bitcoin/runs/22304421122

  13. theuni commented at 9:11 pm on March 5, 2024: member

    So I’d say either:

    I wanted to avoid having to pull this out into configure. So happy to just go with linux || freebsd. Sent up patch upstream that may get the gnulib docs fixed: https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00038.html.

    Nice work! This has been accepted upstream.

  14. theuni commented at 9:15 pm on March 5, 2024: member
    utACK after re-adding the accidentally dropped line.
  15. fuzz: restrict fopencookie usage to Linux & FreeBSD
    Should fix the GCC compilation portion of #29517:
    https://github.com/bitcoin/bitcoin/issues/29517#issuecomment-1973573314.
    
    See also:
    https://www.gnu.org/software/gnulib/manual/html_node/fopencookie.html
    but note that FreeBSD has supported this function since 11.x.
    312f3381a2
  16. fanquake force-pushed on Mar 5, 2024
  17. DrahtBot removed the label CI failed on Mar 5, 2024
  18. fanquake renamed this:
    fuzz: restrict fopencookie usage to __linux__
    fuzz: restrict fopencookie usage to LInux & FreeBSD
    on Mar 6, 2024
  19. fanquake renamed this:
    fuzz: restrict fopencookie usage to LInux & FreeBSD
    fuzz: restrict fopencookie usage to Linux & FreeBSD
    on Mar 6, 2024
  20. m3dwards commented at 10:57 am on March 6, 2024: contributor

    I’m struggling to replicate the issue on OpenBSD as yes fopencookie is not available in their version of libc but _GNU_SOURCE also isn’t defined.

    One caveat is that I wasn’t able to try OpenBSD on power pc and instead ran it on x86.

    ACK https://github.com/bitcoin/bitcoin/pull/29529/commits/312f3381a2d3a7afb7c81b4662214d4d67b4e84a

    As this shouldn’t cause harm and someone managed to hit the problem.

  21. TheCharlatan approved
  22. TheCharlatan commented at 12:04 pm on March 6, 2024: contributor
    utACK 312f3381a2d3a7afb7c81b4662214d4d67b4e84a
  23. DrahtBot requested review from theuni on Mar 6, 2024
  24. fanquake merged this on Mar 6, 2024
  25. fanquake closed this on Mar 6, 2024

  26. fanquake deleted the branch on Mar 6, 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: 2024-12-27 03:12 UTC

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