Incorrect unwind when throwing exceptions - possible cause?

Sam Varshavchik mrsam@courier-mta.com
Thu Feb 3 01:06:07 GMT 2022


Juraj Oršulić writes:

> I have a hair-tearing problem with x86_64 gcc 9.3.0 (Ubuntu 20.04),
> -O2 and the following "minimal" example
> (the real minimal example also links in a bunch of 3rd party libraries
> and is a part of a big project, so I can't really provide a minimal example,
> but I slimmed it down to basically this):
>
> class Application() {
> public:
>   Application(int argc, char **argv) {}
>
>   int process() {
>      if (argc > 1)  { throw std::runtime_error("Exception"); }
>
>     // do some processing here
>     return 0;
>   }

This was slimmed down too much. I don't see how this would compile.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20220202/ea7eba06/attachment.sig>


More information about the Gcc-help mailing list