* [Bug middle-end/104449] [9/10/11/12 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic
2022-02-08 19:57 [Bug middle-end/104449] New: [9/10/11/12 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic zsojka at seznam dot cz
@ 2022-02-08 21:19 ` pinskia at gcc dot gnu.org
2022-02-09 7:38 ` rguenth at gcc dot gnu.org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-02-08 21:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104449
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Target Milestone|--- |9.5
Ever confirmed|0 |1
Last reconfirmed| |2022-02-08
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. With -fstack-check=generic, __builtin_alloca_with_align is marked as
being able to throw but asan decides to insert its annonations right after the
builtin call instead of on the branch after the function call.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/104449] [9/10/11/12 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic
2022-02-08 19:57 [Bug middle-end/104449] New: [9/10/11/12 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic zsojka at seznam dot cz
2022-02-08 21:19 ` [Bug middle-end/104449] " pinskia at gcc dot gnu.org
@ 2022-02-09 7:38 ` rguenth at gcc dot gnu.org
2022-02-10 16:27 ` jakub at gcc dot gnu.org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-02-09 7:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104449
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/104449] [9/10/11/12 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic
2022-02-08 19:57 [Bug middle-end/104449] New: [9/10/11/12 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic zsojka at seznam dot cz
2022-02-08 21:19 ` [Bug middle-end/104449] " pinskia at gcc dot gnu.org
2022-02-09 7:38 ` rguenth at gcc dot gnu.org
@ 2022-02-10 16:27 ` jakub at gcc dot gnu.org
2022-02-11 14:46 ` jakub at gcc dot gnu.org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-02-10 16:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104449
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r8-1884-ge3174bdf35c172f69daf08350401aa177f8f1498
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/104449] [9/10/11/12 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic
2022-02-08 19:57 [Bug middle-end/104449] New: [9/10/11/12 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic zsojka at seznam dot cz
` (2 preceding siblings ...)
2022-02-10 16:27 ` jakub at gcc dot gnu.org
@ 2022-02-11 14:46 ` jakub at gcc dot gnu.org
2022-02-11 18:31 ` [Bug sanitizer/104449] " jakub at gcc dot gnu.org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-02-11 14:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104449
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
C++ testcase that ICEs with such options even at -O2:
void bar (int *);
struct A { A (); ~A (); };
void
foo (int n)
{
A b;
{
int a[n];
bar (a);
}
}
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug sanitizer/104449] [9/10/11/12 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic
2022-02-08 19:57 [Bug middle-end/104449] New: [9/10/11/12 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic zsojka at seznam dot cz
` (3 preceding siblings ...)
2022-02-11 14:46 ` jakub at gcc dot gnu.org
@ 2022-02-11 18:31 ` jakub at gcc dot gnu.org
2022-02-12 12:20 ` ebotcazou at gcc dot gnu.org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-02-11 18:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104449
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 52421
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52421&action=edit
gcc12-pr104449.patch
Untested fix.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug sanitizer/104449] [9/10/11/12 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic
2022-02-08 19:57 [Bug middle-end/104449] New: [9/10/11/12 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic zsojka at seznam dot cz
` (4 preceding siblings ...)
2022-02-11 18:31 ` [Bug sanitizer/104449] " jakub at gcc dot gnu.org
@ 2022-02-12 12:20 ` ebotcazou at gcc dot gnu.org
2022-02-12 18:18 ` cvs-commit at gcc dot gnu.org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2022-02-12 12:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104449
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu.org
--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Confirmed. With -fstack-check=generic, __builtin_alloca_with_align is marked
> as being able to throw but asan decides to insert its annonations right
> after the builtin call instead of on the branch after the function call.
With any -fstack-check option to be exact:
/* If we're checking the stack, `alloca' can throw. */
const int alloca_flags
= ECF_MALLOC | ECF_LEAF | (flag_stack_check ? 0 : ECF_NOTHROW);
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug sanitizer/104449] [9/10/11/12 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic
2022-02-08 19:57 [Bug middle-end/104449] New: [9/10/11/12 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic zsojka at seznam dot cz
` (5 preceding siblings ...)
2022-02-12 12:20 ` ebotcazou at gcc dot gnu.org
@ 2022-02-12 18:18 ` cvs-commit at gcc dot gnu.org
2022-02-12 18:21 ` [Bug sanitizer/104449] [9/10/11 " jakub at gcc dot gnu.org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-12 18:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104449
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:f0c7367b8802c47efaad87b1f2126fe6350d8b47
commit r12-7214-gf0c7367b8802c47efaad87b1f2126fe6350d8b47
Author: Jakub Jelinek <jakub@redhat.com>
Date: Sat Feb 12 19:17:44 2022 +0100
asan: Fix up address sanitizer instrumentation of __builtin_alloca* if it
can throw [PR104449]
With -fstack-check* __builtin_alloca* can throw and the asan
instrumentation of this builtin wasn't prepared for that case.
The following patch fixes that by replacing the builtin with the
replacement builtin and emitting any further insns on the fallthru
edge.
I haven't touched the hwasan code which most likely suffers from the
same problem.
2022-02-12 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/104449
* asan.cc: Include tree-eh.h.
(handle_builtin_alloca): Handle the case when __builtin_alloca or
__builtin_alloca_with_align can throw.
* gcc.dg/asan/pr104449.c: New test.
* g++.dg/asan/pr104449.C: New test.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug sanitizer/104449] [9/10/11 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic
2022-02-08 19:57 [Bug middle-end/104449] New: [9/10/11/12 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic zsojka at seznam dot cz
` (6 preceding siblings ...)
2022-02-12 18:18 ` cvs-commit at gcc dot gnu.org
@ 2022-02-12 18:21 ` jakub at gcc dot gnu.org
2022-02-19 8:02 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-02-12 18:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104449
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[9/10/11/12 Regression] |[9/10/11 Regression] ICE:
|ICE: verify_gimple failed: |verify_gimple failed: dead
|dead statement in EH table |statement in EH table with
|with -fexceptions |-fexceptions
|-fsanitize=address |-fsanitize=address
|-fstack-check=generic |-fstack-check=generic
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on the trunk so far.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug sanitizer/104449] [9/10/11 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic
2022-02-08 19:57 [Bug middle-end/104449] New: [9/10/11/12 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic zsojka at seznam dot cz
` (7 preceding siblings ...)
2022-02-12 18:21 ` [Bug sanitizer/104449] [9/10/11 " jakub at gcc dot gnu.org
@ 2022-02-19 8:02 ` cvs-commit at gcc dot gnu.org
2022-02-19 8:08 ` [Bug sanitizer/104449] [9/10 " jakub at gcc dot gnu.org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-19 8:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104449
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:8a97d7bdb38285a7954f67172013098b61548870
commit r11-9604-g8a97d7bdb38285a7954f67172013098b61548870
Author: Jakub Jelinek <jakub@redhat.com>
Date: Sat Feb 12 19:17:44 2022 +0100
asan: Fix up address sanitizer instrumentation of __builtin_alloca* if it
can throw [PR104449]
With -fstack-check* __builtin_alloca* can throw and the asan
instrumentation of this builtin wasn't prepared for that case.
The following patch fixes that by replacing the builtin with the
replacement builtin and emitting any further insns on the fallthru
edge.
I haven't touched the hwasan code which most likely suffers from the
same problem.
2022-02-12 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/104449
* asan.c: Include tree-eh.h.
(handle_builtin_alloca): Handle the case when __builtin_alloca or
__builtin_alloca_with_align can throw.
* gcc.dg/asan/pr104449.c: New test.
* g++.dg/asan/pr104449.C: New test.
(cherry picked from commit f0c7367b8802c47efaad87b1f2126fe6350d8b47)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug sanitizer/104449] [9/10 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic
2022-02-08 19:57 [Bug middle-end/104449] New: [9/10/11/12 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic zsojka at seznam dot cz
` (8 preceding siblings ...)
2022-02-19 8:02 ` cvs-commit at gcc dot gnu.org
@ 2022-02-19 8:08 ` jakub at gcc dot gnu.org
2022-04-12 7:21 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-02-19 8:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104449
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[9/10/11 Regression] ICE: |[9/10 Regression] ICE:
|verify_gimple failed: dead |verify_gimple failed: dead
|statement in EH table with |statement in EH table with
|-fexceptions |-fexceptions
|-fsanitize=address |-fsanitize=address
|-fstack-check=generic |-fstack-check=generic
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 11.3+ too.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug sanitizer/104449] [9/10 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic
2022-02-08 19:57 [Bug middle-end/104449] New: [9/10/11/12 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic zsojka at seznam dot cz
` (9 preceding siblings ...)
2022-02-19 8:08 ` [Bug sanitizer/104449] [9/10 " jakub at gcc dot gnu.org
@ 2022-04-12 7:21 ` jakub at gcc dot gnu.org
2022-05-10 8:23 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-04-12 7:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104449
Bug 104449 depends on bug 105214, which changed state.
Bug 105214 Summary: [12 Regression] ICE: in connect_traces, at dwarf2cfi.cc:3074 with custom flags
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105214
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug sanitizer/104449] [9/10 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic
2022-02-08 19:57 [Bug middle-end/104449] New: [9/10/11/12 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic zsojka at seznam dot cz
` (10 preceding siblings ...)
2022-04-12 7:21 ` jakub at gcc dot gnu.org
@ 2022-05-10 8:23 ` cvs-commit at gcc dot gnu.org
2022-05-11 6:24 ` cvs-commit at gcc dot gnu.org
2022-05-11 6:36 ` jakub at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-10 8:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104449
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:f5b1fcfd69c7a09f661ebec1341f3df34aec4ead
commit r10-10679-gf5b1fcfd69c7a09f661ebec1341f3df34aec4ead
Author: Jakub Jelinek <jakub@redhat.com>
Date: Sat Feb 12 19:17:44 2022 +0100
asan: Fix up address sanitizer instrumentation of __builtin_alloca* if it
can throw [PR104449]
With -fstack-check* __builtin_alloca* can throw and the asan
instrumentation of this builtin wasn't prepared for that case.
The following patch fixes that by replacing the builtin with the
replacement builtin and emitting any further insns on the fallthru
edge.
I haven't touched the hwasan code which most likely suffers from the
same problem.
2022-02-12 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/104449
* asan.c: Include tree-eh.h.
(handle_builtin_alloca): Handle the case when __builtin_alloca or
__builtin_alloca_with_align can throw.
* gcc.dg/asan/pr104449.c: New test.
* g++.dg/asan/pr104449.C: New test.
(cherry picked from commit f0c7367b8802c47efaad87b1f2126fe6350d8b47)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug sanitizer/104449] [9/10 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic
2022-02-08 19:57 [Bug middle-end/104449] New: [9/10/11/12 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic zsojka at seznam dot cz
` (11 preceding siblings ...)
2022-05-10 8:23 ` cvs-commit at gcc dot gnu.org
@ 2022-05-11 6:24 ` cvs-commit at gcc dot gnu.org
2022-05-11 6:36 ` jakub at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-11 6:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104449
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:77ee9b906d1c214648230d417b45831b8ef8386a
commit r9-10127-g77ee9b906d1c214648230d417b45831b8ef8386a
Author: Jakub Jelinek <jakub@redhat.com>
Date: Sat Feb 12 19:17:44 2022 +0100
asan: Fix up address sanitizer instrumentation of __builtin_alloca* if it
can throw [PR104449]
With -fstack-check* __builtin_alloca* can throw and the asan
instrumentation of this builtin wasn't prepared for that case.
The following patch fixes that by replacing the builtin with the
replacement builtin and emitting any further insns on the fallthru
edge.
I haven't touched the hwasan code which most likely suffers from the
same problem.
2022-02-12 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/104449
* asan.c: Include tree-eh.h.
(handle_builtin_alloca): Handle the case when __builtin_alloca or
__builtin_alloca_with_align can throw.
* gcc.dg/asan/pr104449.c: New test.
* g++.dg/asan/pr104449.C: New test.
(cherry picked from commit f0c7367b8802c47efaad87b1f2126fe6350d8b47)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug sanitizer/104449] [9/10 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic
2022-02-08 19:57 [Bug middle-end/104449] New: [9/10/11/12 Regression] ICE: verify_gimple failed: dead statement in EH table with -fexceptions -fsanitize=address -fstack-check=generic zsojka at seznam dot cz
` (12 preceding siblings ...)
2022-05-11 6:24 ` cvs-commit at gcc dot gnu.org
@ 2022-05-11 6:36 ` jakub at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-05-11 6:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104449
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 15+ messages in thread