https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119778
            Bug ID: 119778
           Summary: gcc gimple crashes on some setjmp/longjmp code
           Product: gcc
           Version: 13.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: izaberina at gmail dot com
  Target Milestone: ---

Created attachment 61092
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61092&action=edit
the horrible code in question

so i wrote some horrible code: https://godbolt.org/z/v9fe1Mo98

as shown on godbolt:
- it behaves as intended with asan
- it doesn't print anything without asan
- it reliably crashes gcc with -Wall -O2 starting from gcc 13.3.0 up to at
least 14.2.0

```
during GIMPLE pass: uninit
<source>: In member function 'void tac::f()':
<source>:10:10: internal compiler error: Segmentation fault
   10 |     void f() {
      |          ^
```

crashing seems suboptimal, although one could argue that this code wasn't ever
supposed to work, and that crashing on it is a better result than building it

one could also argue that asan shouldn't change its behaviour this way

Reply via email to