Re: [PATCH/RFC] On the use of -funreachable-traps to deal with PR 109627

2024-04-09 Thread Iain Sandoe
> On 9 Apr 2024, at 08:53, Iain Sandoe wrote: > > > >> On 9 Apr 2024, at 08:48, Jakub Jelinek wrote: >> >> On Tue, Apr 09, 2024 at 09:44:01AM +0200, Richard Biener wrote: >>> (why not do it at each such switch?) >> >> Because the traps would then be added even to the bbs which later >>

Re: [PATCH/RFC] On the use of -funreachable-traps to deal with PR 109627

2024-04-09 Thread Iain Sandoe
> On 9 Apr 2024, at 08:48, Jakub Jelinek wrote: > > On Tue, Apr 09, 2024 at 09:44:01AM +0200, Richard Biener wrote: >> (why not do it at each such switch?) > > Because the traps would then be added even to the bbs which later > end up in the middle of the function. If we defer the

Re: [PATCH/RFC] On the use of -funreachable-traps to deal with PR 109627

2024-04-09 Thread Jakub Jelinek
On Tue, Apr 09, 2024 at 09:44:01AM +0200, Richard Biener wrote: > (why not do it at each such switch?) Because the traps would then be added even to the bbs which later end up in the middle of the function. Jakub

Re: [PATCH/RFC] On the use of -funreachable-traps to deal with PR 109627

2024-04-09 Thread Richard Biener
On Tue, Apr 9, 2024 at 9:11 AM Jakub Jelinek wrote: > > On Tue, Apr 09, 2024 at 09:03:59AM +0200, Richard Biener wrote: > > > With the possibility of sounding like a broken record, I think > > > __builtin_unreachable is fundamentally flawed. It generates no code > > > and just lets the program

Re: [PATCH/RFC] On the use of -funreachable-traps to deal with PR 109627

2024-04-09 Thread Jakub Jelinek
On Tue, Apr 09, 2024 at 09:03:59AM +0200, Richard Biener wrote: > > With the possibility of sounding like a broken record, I think > > __builtin_unreachable is fundamentally flawed. It generates no code > > and just lets the program continue if ever "reached". This is a > > security risk and

Re: [PATCH/RFC] On the use of -funreachable-traps to deal with PR 109627

2024-04-09 Thread Richard Biener
On Tue, Apr 9, 2024 at 6:03 AM Jeff Law wrote: > > > > On 4/8/24 5:04 PM, Iain Sandoe wrote: > > Hi > > > > PR 109627 is about functions that have had their bodies completely elided, > > but still have the wrappers for EH frames (either .cfi_xxx or LFSxx/LFExx). > > > > These are causing issues

Re: [PATCH/RFC] On the use of -funreachable-traps to deal with PR 109627

2024-04-08 Thread Jeff Law
On 4/8/24 5:04 PM, Iain Sandoe wrote: Hi PR 109627 is about functions that have had their bodies completely elided, but still have the wrappers for EH frames (either .cfi_xxx or LFSxx/LFExx). These are causing issues for some linkers because such functions result in FDEs with a 0 code

Re: [PATCH/RFC] On the use of -funreachable-traps to deal with PR 109627

2024-04-08 Thread Andrew Pinski
On Mon, Apr 8, 2024 at 4:04 PM Iain Sandoe wrote: > > Hi > > PR 109627 is about functions that have had their bodies completely elided, > but still have the wrappers for EH frames (either .cfi_xxx or LFSxx/LFExx). I was thinking about how to fix this once and for all. The easiest method I could