public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/109700] New: [13/14 regression] ICE with address sanitizer after declaring __builtin_alloca
@ 2023-05-02 15:43 jlegg at feralinteractive dot com
  2023-05-02 15:52 ` [Bug sanitizer/109700] " jakub at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jlegg at feralinteractive dot com @ 2023-05-02 15:43 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-05-03  9:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-02 15:43 [Bug sanitizer/109700] New: [13/14 regression] ICE with address sanitizer after declaring __builtin_alloca jlegg at feralinteractive dot com
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

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).