Re: Incorrect unwind when throwing exceptions - possible cause?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just to confirm, the problem was solved by adjusting the 3rdparty library
guilty for pulling in libunwind (in our case, Google glog, which has it as
an optional dependency) and evicting libunwind from the link list
(and using gcc's builtin unwinder instead).

It looks like that an up-to-date libunwind on Arch as of today doesn't have
this bug, but it's certainly present on Ubuntu 20.04.

Thanks again Florian!

On Thu, Feb 3, 2022 at 2:40 PM Juraj Oršulić <juraj.orsulic@xxxxxx> wrote:
>
> Sorry for replying privately by mistake.
>
> Thank you so much Florian, I was not aware that libunwind is not the default
> unwinder. That could be the key to this and looks like we're linking it probably
> due to a 3rd party dependency.
>
> Looks like I made a mistake by reducing our project to an exception
> hello-world crashing minimum example instead of building one externally.
>
> In fact, I did, but I saw that _Unwind_RaiseException is called directly in
> __cxa_throw in libstdc++, so I assumed that is how it normally goes.
> Now I see that gcc provides a built-in for this function.
>
>
> On Thu, Feb 3, 2022 at 1:26 PM Florian Weimer <fweimer@xxxxxxxxxx> wrote:
> >
> > * Juraj Oršulić:
> >
> > > I haven’t specified anything, so it’s using libunwind.so by default.
> > > I have stepped through libunwind and observed the moment of curruption when it
> > > prematurely commits the new rbp value.
> >
> > The default for GCC is its built-in unwinder.  If you are using
> > libunwind, you need to talk to the libunwind developers.
> >
> > Please keep posting to the list.
> >
> > Thanks,
> > Florian
> >




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux