Flawed PROVIDE_FUZZ_MAIN_FUNCTION test #28563

issue luke-jr openend this issue on October 3, 2023
  1. luke-jr commented at 4:00 am on October 3, 2023: member

    The current test uses AX_CHECK_LINK_FLAG which is buggy in multiple ways:

    1. It prints its own “checking” line, which interrupts the main one.
    2. The AX_CHECK_LINK_FLAG macro is used incorrectly, with a null flag to check. We’re actually testing if the linker accepts the code, which is what AC_LINK_IFELSE is for.
    3. It attempts to use/create a cache based on the provided flags, which in this case are blank and $SANITIZER_LDFLAGS.
    4. The generated code for the cache variable is printf "%s\n" "ax_cv_check_ldflags_$SANITIZER_LDFLAGS_" which will access the wrong variable, SANITIZER_LDFLAGS_, typically undefined, and therefore use a generic cache variable of merely ax_cv_check_ldflags_

    I don’t see any real practical harm in this, but it might be a good idea to fix it, especially since any repetition of this pattern would cause the cache to get used incorrectly.

  2. maflcko commented at 6:54 pm on February 8, 2024: member

    I don’t see any real practical harm in this

    Let’s move the discussion to #28564

  3. maflcko closed this on Feb 8, 2024


luke-jr maflcko


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-07-01 13:12 UTC

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