public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jlegg at feralinteractive dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug sanitizer/109700] New: [13/14 regression] ICE with address sanitizer after declaring __builtin_alloca
Date: Tue, 02 May 2023 15:43:47 +0000	[thread overview]
Message-ID: <bug-109700-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 109700
           Summary: [13/14 regression] ICE with address sanitizer after
                    declaring __builtin_alloca
           Product: gcc
           Version: 13.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jlegg at feralinteractive dot com
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at gcc dot gnu.org
  Target Milestone: ---

Created attachment 54971
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54971&action=edit
Preprocessed source, GCC 13.1.1

When compiling this as C++:
void *__builtin_alloca(unsigned long);
void f(int *);
void g() {
  int x;
  int *y = (int *)__builtin_alloca(sizeof(int));
  *y = 0;
  f(&x);
}

using g++ -fsanitize=address -Og test.cpp -c, I get the following error with
GCC 13.1.1:
during GIMPLE pass: ehcleanup
test.cpp: In function ‘void g()’:
test.cpp:3:6: internal compiler error: in mark_reachable_handlers, at
tree-eh.cc:4063
    3 | void g() {
      |      ^

The GCC trunk option on Compiler Explorer currently
((Compiler-Explorer-Build-gcc-4d68c7f7b5aea5e95f44c3af13a24aa3daae9cf5-binutils-2.40)
14.0.0 20230501 (experimental)) has a different internal compiler error:
<source>: In function 'void g()':
<source>:5:6: error: BB 2 cannot throw but has an EH edge
    5 | void g() {
      |      ^
during GIMPLE pass: asan
<source>:5:6: internal compiler error: verify_flow_info failed
0x23643ae internal_error(char const*, ...)
        ???:0
0xe18267 verify_flow_info()
        ???:0

GCC 12.2 compiles this code.

             reply	other threads:[~2023-05-02 15:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-02 15:43 jlegg at feralinteractive dot com [this message]
2023-05-02 15:52 ` [Bug sanitizer/109700] " jakub at gcc dot gnu.org
2023-05-02 15:57 ` pinskia at gcc dot gnu.org
2023-05-02 18:50 ` [Bug sanitizer/109700] " pinskia at gcc dot gnu.org
2023-05-02 18:53 ` pinskia at gcc dot gnu.org
2023-05-02 18:55 ` pinskia at gcc dot gnu.org
2023-05-02 19:10 ` jlegg at feralinteractive dot com
2023-05-03  9:41 ` [Bug sanitizer/109700] ICE with address sanitizer after declaring __builtin_alloca since r8-1884-ge3174bdf35c172f marxin 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-109700-4@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).