Recursive SIGSEGV question
Jonathan Wakely
jwakely.gcc@gmail.com
Wed Mar 27 00:29:00 GMT 2019
On Tue, 26 Mar 2019 at 06:13, Xi Ruoyao wrote:
> > C++ exceptions show a few clues when there is a crash, which is helpful, eg:
> >
> > // g++-8 -Wall -o cpp cpp.cpp
> > #include <vector>
> > int main()
> > {
> > std::vector<int> v;
> > return v.at(0);
> > }
> >
> >
> > $ ./cpp
> > terminate called after throwing an instance of 'std::out_of_range'
> > what(): vector::_M_range_check: __n (which is 0) >= this->size()
> > (which is 0)
> > Aborted
>
> I'm not familiar with C++ exception. Maybe we can convert some instances of
> unhandled signals to something like __gnu_cxx::unhandled_signal_exception, but I
> believe that would require ABI changes.
I don't think that's a good idea. Signals are not exceptions, and vice versa.
More information about the Gcc-help
mailing list