public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug gcov-profile/114115] xz-utils segfaults when built with -fprofile-generate (bad interaction between IFUNC and binding?)
Date: Mon, 15 Apr 2024 11:29:29 +0000	[thread overview]
Message-ID: <bug-114115-4-0KpUdvNKDn@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114115-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #20 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:

https://gcc.gnu.org/g:574d52a9b6e40a466b90f4810e72d3dd072d5160

commit r11-11321-g574d52a9b6e40a466b90f4810e72d3dd072d5160
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Feb 26 08:38:58 2024 -0800

    tree-profile: Disable indirect call profiling for IFUNC resolvers

    We can't profile indirect calls to IFUNC resolvers nor their callees as
    it requires TLS which hasn't been set up yet when the dynamic linker is
    resolving IFUNC symbols.

    Add an IFUNC resolver caller marker to cgraph_node and set it if the
    function is called by an IFUNC resolver.  Disable indirect call profiling
    for IFUNC resolvers and their callees.

    Tested with profiledbootstrap on Fedora 39/x86-64.

    gcc/ChangeLog:

            PR tree-optimization/114115
            * cgraph.h (symtab_node): Add check_ifunc_callee_symtab_nodes.
            (cgraph_node): Add called_by_ifunc_resolver.
            * cgraphunit.c (symbol_table::compile): Call
            symtab_node::check_ifunc_callee_symtab_nodes.
            * symtab.c (check_ifunc_resolver): New.
            (ifunc_ref_map): Likewise.
            (is_caller_ifunc_resolver): Likewise.
            (symtab_node::check_ifunc_callee_symtab_nodes): Likewise.
            * tree-profile.c (gimple_gen_ic_func_profiler): Disable indirect
            call profiling for IFUNC resolvers and their callees.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/114115
            * gcc.dg/pr114115.c: New test.

    (cherry picked from commit cab32bacaea268ec062b1fb4fc662d90c9d1cfce)

  parent reply	other threads:[~2024-04-15 11:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26 14:10 [Bug gcov-profile/114115] New: " sjames at gcc dot gnu.org
2024-02-26 14:11 ` [Bug gcov-profile/114115] " sjames at gcc dot gnu.org
2024-02-26 14:13 ` sjames at gcc dot gnu.org
2024-02-26 14:13 ` sjames at gcc dot gnu.org
2024-02-26 14:37 ` pinskia at gcc dot gnu.org
2024-02-26 14:40 ` pinskia at gcc dot gnu.org
2024-02-26 14:52 ` rguenth at gcc dot gnu.org
2024-02-26 16:17 ` hjl.tools at gmail dot com
2024-02-26 16:23 ` hjl.tools at gmail dot com
2024-02-26 22:54 ` hjl.tools at gmail dot com
2024-04-02 10:27 ` jasonwucj at gcc dot gnu.org
2024-04-02 10:30 ` sjames at gcc dot gnu.org
2024-04-02 10:35 ` sjames at gcc dot gnu.org
2024-04-02 13:50 ` pinskia at gcc dot gnu.org
2024-04-03 14:07 ` cvs-commit at gcc dot gnu.org
2024-04-03 14:08 ` hjl.tools at gmail dot com
2024-04-03 14:10 ` hubicka at ucw dot cz
2024-04-05  9:13 ` cvs-commit at gcc dot gnu.org
2024-04-14 19:59 ` hjl.tools at gmail dot com
2024-04-15 11:23 ` cvs-commit at gcc dot gnu.org
2024-04-15 11:26 ` cvs-commit at gcc dot gnu.org
2024-04-15 11:29 ` cvs-commit at gcc dot gnu.org [this message]
2024-04-15 11:30 ` hjl.tools at gmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-114115-4-0KpUdvNKDn@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).