Public bug reported:

Initially reported at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118538

Seems to happen on ubuntu 24.04 arm64 running on a raspberry pi 5

Operating System: Ubuntu 24.04.1 LTS
          Kernel: Linux 6.8.0-1017-raspi
    Architecture: arm64

The attached reproduction throws a segfault rather than throwing the
raised exception properly.

g++-14 -O0 -std=c++17 -Wall -Wextra -Wpedantic -Wuninitialized 
-fno-strict-aliasing -fwrapv -g3 test.cpp && ./a.out
test.cpp: In function ‘int main()’:
test.cpp:55:10: warning: variable ‘reader’ set but not used 
[-Wunused-but-set-variable]
   55 |     auto reader = Reader("file", 1);
      |          ^~~~~~
[1]    473461 segmentation fault (core dumped)  ./a.out

** Affects: gcc-14 (Ubuntu)
     Importance: Undecided
         Status: New

** Attachment added: "reproduction.cpp"
   
https://bugs.launchpad.net/bugs/2095206/+attachment/5852531/+files/reproduction.cpp

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2095206

Title:
  throw not caught causing an seg fault rather than a `terminate called
  after throwing an instance of 'int'` message

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-14/+bug/2095206/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to