Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bisect runner tweaks #20016

Merged
merged 26 commits into from Feb 11, 2023
Merged

Bisect runner tweaks #20016

merged 26 commits into from Feb 11, 2023

Commits on Feb 11, 2023

  1. bisect-runner.pl should patch Errno 1.22 and earlier for gcc 5 and later

    Without this fix, the generated Errno.pm will contain no entries, which
    whilst syntactically valid causes much confusion later on when the bisect
    run gives bogus results due to non-buggy module code unrelated to the test
    case failing because %! is wrong.
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    194fb4b View commit details
    Browse the repository at this point in the history
  2. bisect-runner.pl should patch Errno 1.111 and earlier for gcc

    Without this fix, Errno.pm fails to build.
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    d2d29a1 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    27901ed View commit details
    Browse the repository at this point in the history
  4. bisect-runner.pl must ensure that safemalloc etc have prototypes

    Else they are implicitly assumed to return int, which can truncate addresses
    on systems where pointers are larger than ints (such as 64 bit systems).
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    53ec535 View commit details
    Browse the repository at this point in the history
  5. bisect-runner.pl needs to disable Configure's use of nm before 5.004

    Strictly we only need this for glibc systems, but it doesn't seem terrible
    to do it everywhere.
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    4e75b97 View commit details
    Browse the repository at this point in the history
  6. bisect-runner.pl should "fail" if config.sh is missing with --test-build

    Previously it would skip, which meant you couldn't bisect the cause of
    some ./Configure failures, which rather defeats the intent of --test-build.
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    5b62e06 View commit details
    Browse the repository at this point in the history
  7. bisect-runner.pl must patch darwin hints to handle macOS 11, 12 etc

    The version number moved beyond 10, and older hints files were not ready for
    this.
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    fab9606 View commit details
    Browse the repository at this point in the history
  8. bisect-runner.pl must patch Configure to avoid myread looping infinitely

    Configure can get stuck and ask questions for which it needs a valid answer
    before it can continue. As-is, if you redirect stdin from /dev/null (or close
    the file descriptor) it will (effectively) loop infinitely repeating the same
    question, because it doesn't like empty string as an answer. Worse - it keeps
    repeating the question to stdout - eg 'Where is your C library?'
    
    Rather than attempting to patch the shell script to detect errors on read
    (because they only matter the *second* time round the loop, *and* wouldn't
    handle the /dev/null case), it's easier to patch the relevant loop so that
    it will abort after too many loop iterations.
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    839626e View commit details
    Browse the repository at this point in the history
  9. bisect-runner.pl must stop Configure looping on "does not exit"

    This only affects a small range of commits in development releases, but
    without this change they can loop infinitely, rather than correctly skipping
    (or failing a build test). An infinite loop (with terminal output) is
    extremely unhelpful.
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    468e1a1 View commit details
    Browse the repository at this point in the history
  10. bisect-runner.pl must expose a prototype for was_lvalue_sub to List::…

    …Util
    
    This problem was rapidly diagnosed and fixed at the time, but we need to fix
    the few commits where the problem exists, else we can't bisect other build
    failures.
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    619c2f4 View commit details
    Browse the repository at this point in the history
  11. bisect-runner.pl needs to patch a build bug in Digest::MD5

    This failure gets in the way of bisecting other problems.
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    906c895 View commit details
    Browse the repository at this point in the history
  12. Copy the full SHA
    8257f1a View commit details
    Browse the repository at this point in the history
  13. bisect-runner.pl needs to avoid using nm on darwin

    Earlier versions of the hints defaulted to using nm, because on older versions
    of OS X (as was) it worked.
    
    It also needs to patch the hints file to force d_stdstdio to "undef".
    Without this, a build with "d_faststdio" defined (or implicit) will fail badly
    on current macOS, such as the perl-5.8.0 tag.
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    2f61c58 View commit details
    Browse the repository at this point in the history
  14. bisect-runner.pl needs to use the current approach for symbol probing

    The older version assumed an explicit prototype for printf(), which doesn't
    fly on arm64 macOS. It might not be robust on some other platforms too,
    whereas the "current" (ie 2003 onward) approach still works everywhere.
    
    Change edit_file() to only localise $/ to undef during the read, so that it's
    restored to its default ("\n") when the callback is invoked. Without this,
    `chomp` "doesn't work" (as expected) in the callback.
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    bb98717 View commit details
    Browse the repository at this point in the history
  15. bisect-runner.pl must include more headers in Configure probes

    Without these various probes rely on implicit function declarations, typically
    for exit() or printf(). macOS now forbids implicit function declarations,
    which causes these probes to become compile time errors and hence "fail".
    This results in Configure assuming that many symbols are missing, and the
    build fails where it should pass.
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    ecf24c3 View commit details
    Browse the repository at this point in the history
  16. bisect-runner.pl needs a probe for setpgrp with function prototypes

    Else it can't build 5.003 or 5.002 on macOS.
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    73aff76 View commit details
    Browse the repository at this point in the history
  17. bisect-runner.pl needs to force a -flat_namespace before v5.10.0

    The hints for macOS set -flat_namespace conditionally based on darwin
    version, so that newer OSes would default to the native two level namespace.
    However, the build of miniperl was relying on a flat namespace prior to a
    refactoring during the 5.9.x series. Hence we need to force this linker flag
    when building versions before this on current macOS versions.
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    7d99470 View commit details
    Browse the repository at this point in the history
  18. bisect-runner.pl needs to set DYLD_LIBRARY_PATH on macOS

    El Capitan (OS X 10.11) (and later) strip DYLD_LIBRARY_PATH from the
    environment of /bin/sh, hence setting the existing code that sets this in
    %ENV assuming that it is visible to the invoked process no longer works. We
    have to be explicit in every invocation, as part of the command that the
    shell itself is processing.
    
    This hurts us because in 5.8.0 and earlier the hints default macOS to build
    a shared perl library.
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    7aa54fe View commit details
    Browse the repository at this point in the history
  19. bisect-runner.pl needs to ensure a prototype for __getBerkeleyDBInfo()

    Without this some early versions of DB_File won't build on current macOS,
    and any other platform where the C compiler is agressive about prototypes.
    
    This commit refactors code for an existing DB_File patch to split a compound
    if statement into two ifs.
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    a7159ad View commit details
    Browse the repository at this point in the history
  20. bisect-runner.pl needs to fix a shell heredoc error in Makefile.SH

    Else some development versions of 5.003 mysteriously won't build.
    These versions aren't important in themselves, but their failure makes it
    hard to bisect real problems.
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    ab84059 View commit details
    Browse the repository at this point in the history
  21. bisect-runner.pl must ensure prototypes exist for htovs() etc

    These fallback functions are defined in util.c, but initially did not have
    any prototypes in a header.
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    3c1e354 View commit details
    Browse the repository at this point in the history
  22. bisect-runner.pl must ensure that perl.h includes fcntl.h and sys/file.h

    The C code needs prototypes from these headers.
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    deda689 View commit details
    Browse the repository at this point in the history
  23. Copy the full SHA
    6d4507d View commit details
    Browse the repository at this point in the history
  24. bisect-runner.pl shouldn't generate undef warnings from internal patches

    The regex wasn't handling context diffs, and two of the unified diffs were
    generated with differing filenames and trailing timestamp text that it wasn't
    robust against.
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    902ed9e View commit details
    Browse the repository at this point in the history
  25. bisect-runner.pl must patch dl_dyld.xs to eliminate the PREINIT section

    *Really* early xsubpp doesn't understand this, and it turns out to be trivial
    to eliminate it.
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    889794d View commit details
    Browse the repository at this point in the history
  26. bisect-runner.pl should supply a prototype for Gv_AMupdate

    This was missing prior to perl-5.001
    nwc10 authored and demerphq committed Feb 11, 2023
    Copy the full SHA
    eb2a178 View commit details
    Browse the repository at this point in the history