https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119727

--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Jakub Jelinek
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:b00d87fcc4fcb239999fb8c7f1928b5067bd73a9

commit r13-9606-gb00d87fcc4fcb239999fb8c7f1928b5067bd73a9
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Mon Apr 14 10:18:13 2025 +0200

    driver: On linux hosts disable ASLR during -freport-bug [PR119727]

    Andi had a useful comment that even with the PR119727 workaround to
    ignore differences in libbacktrace printed addresses, it is still better
    to turn off ASLR when easily possible, e.g. in case some address leaks
    in somewhere in the ICE message elsewhere, or to verify the ICE doesn't
    depend on a particular library/binary load addresses.

    The following patch adds a configure check and uses personality syscall
    to turn off randomization for further -freport-bug subprocesses.

    2025-04-14  Jakub Jelinek  <ja...@redhat.com>

            PR driver/119727
            * configure.ac (HOST_HAS_PERSONALITY_ADDR_NO_RANDOMIZE): New check.
            * gcc.cc: Include sys/personality.h if
            HOST_HAS_PERSONALITY_ADDR_NO_RANDOMIZE is defined.
            (try_generate_repro): Call
            personality (personality (0xffffffffU) | ADDR_NO_RANDOMIZE)
            if HOST_HAS_PERSONALITY_ADDR_NO_RANDOMIZE is defined.
            * config.in: Regenerate.
            * configure: Regenerate.

    (cherry picked from commit 5a32e85810d33dc46b1b5fe2803ee787d40709d5)

Reply via email to