This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] toplev: avoid recursive emergency_dump_function


On Sat, 22 Jul 2017, Segher Boessenkool wrote:
> On Thu, Jul 20, 2017 at 05:40:28PM +0300, Alexander Monakov wrote:
> > Segher pointed out on IRC that ICE reporting with dumps enabled got worse:
> > if emergency_dump_function itself leads to an ICE (e.g. by segfaulting),
> > nested ICE reporting will invoke emergency_dump_function in exactly the
> > same context, but not only would we uselessly announce current pass again,
> > this time around the second SIGSEGV will just terminate cc1 because the
> > signal handler is unregistered (so we won't print the backtrace).  Sorry
> > for not really considering the implications when submitting that patch.
> > 
> > Solve this by substituting the callback for global_dc->internal_error;
> > this avoids invoking emergency_dump_function, and also gives a
> > convenient point to flush the dump file.  OK to apply?
> 
> Extra thanks for that last point, it's been driving me nuts :-)
> 
> > 	* topvel.c (dumpfile.h): New include.
> 
> s/topvel/toplev/

I assume this is not an approval to apply - can somebody give an explicit OK?

Thanks!
Alexander


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]