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 c/108880] [11/12 Regression] slow compilation with "-fsanitize=undefined"
Date: Sat, 04 Mar 2023 18:02:58 +0000	[thread overview]
Message-ID: <bug-108880-4-ZF7aIxACl7@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108880-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #17 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Marek Polacek
<mpolacek@gcc.gnu.org>:

https://gcc.gnu.org/g:6ab4c8759754f34f5285924652238c829960cd4c

commit r12-9218-g6ab4c8759754f34f5285924652238c829960cd4c
Author: Marek Polacek <polacek@redhat.com>
Date:   Wed Feb 22 15:17:03 2023 -0500

    c-family: avoid compile-time-hog in c_genericize [PR108880]

    This fixes a compile-time hog with UBSan.  This only happened in cc1 but
    not cc1plus.  The problem is ultimately that c_genericize_control_stmt/
    STATEMENT_LIST -> walk_tree_1 doesn't use a hash_set to remember visited
    nodes, so it kept on recursing for a long time.  We should be able to
    use the pset that c_genericize created.  We just need to use walk_tree
    instead of walk_tree_w_d so that the pset is explicit.

            PR c/108880

    gcc/c-family/ChangeLog:

            * c-gimplify.cc (c_genericize_control_stmt) <case STATEMENT_LIST>:
Pass
            pset to walk_tree_1.
            (c_genericize): Call walk_tree with an explicit pset.

    gcc/testsuite/ChangeLog:

            * c-c++-common/ubsan/pr108880.c: New test.

    (cherry picked from commit 1370014f2ea02ec185cf1199027575916f79fe63)

  parent reply	other threads:[~2023-03-04 18:03 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22  6:41 [Bug sanitizer/108880] New: " qrzhang at gatech dot edu
2023-02-22  6:51 ` [Bug sanitizer/108880] [11/12/13 Regression] " pinskia at gcc dot gnu.org
2023-02-22  6:53 ` pinskia at gcc dot gnu.org
2023-02-22  6:54 ` pinskia at gcc dot gnu.org
2023-02-22  7:12 ` pinskia at gcc dot gnu.org
2023-02-22 10:25 ` [Bug c/108880] " rguenth at gcc dot gnu.org
2023-02-22 10:25 ` rguenth at gcc dot gnu.org
2023-02-22 15:41 ` mpolacek at gcc dot gnu.org
2023-02-22 15:51 ` mpolacek at gcc dot gnu.org
2023-02-22 16:16 ` mpolacek at gcc dot gnu.org
2023-02-22 18:24 ` mpolacek at gcc dot gnu.org
2023-02-22 19:46 ` mpolacek at gcc dot gnu.org
2023-02-22 19:48 ` jakub at gcc dot gnu.org
2023-02-22 19:50 ` mpolacek at gcc dot gnu.org
2023-02-22 20:06 ` jakub at gcc dot gnu.org
2023-02-22 20:14 ` mpolacek at gcc dot gnu.org
2023-02-22 20:46 ` jakub at gcc dot gnu.org
2023-02-22 20:51 ` mpolacek at gcc dot gnu.org
2023-02-22 22:47 ` cvs-commit at gcc dot gnu.org
2023-02-22 22:48 ` [Bug c/108880] [11/12 " mpolacek at gcc dot gnu.org
2023-03-04 18:02 ` cvs-commit at gcc dot gnu.org [this message]
2023-03-07 17:45 ` [Bug c/108880] [11 " mpolacek at gcc dot gnu.org

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-108880-4-ZF7aIxACl7@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).