Subject: Re: bug#17318: 24.4.50; emacs_backtrace.txt

From: Eli Zaretskii <[email-masked]>
Date: Fri, 25 Apr 2014 17:11:26 +0300

> From: Stefan Monnier <[email-masked]>
> Cc: Juanma Barranquero <[email-masked]>,  [email-masked],  [email-masked]
> Date: Fri, 25 Apr 2014 09:43:14 -0400
> 
> >> mark_interval at alloc.c:1333
> 
> >> w32_backtrace at w32fns.c:8476
> >> emacs_abort at w32fns.c:8508
> >> terminate_due_to_signal at emacs.c:382
> >> die at alloc.c:6955
> >> make_natnum at lisp.h:729
> >> Flength at fns.c:119
> >> concat at fns.c:524
> >> Fcopy_sequence at fns.c:456
> >> compile_pattern_1 at search.c:164
> >> compile_pattern at search.c:245
> >> fast_string_match at search.c:478
> >> Ffind_file_name_handler at fileio.c:372
> >> Fexpand_file_name at fileio.c:903
> >> Fdo_auto_save at fileio.c:5553
> >> shut_down_emacs at emacs.c:2033
> >> terminate_due_to_signal at emacs.c:366
> >> handle_fatal_signal at sysdep.c:1630
> >> deliver_thread_signal at sysdep.c:1604
> >> deliver_fatal_thread_signal at sysdep.c:1642
> >> ?? at crt1.c:0
> 
> > Looks like a new one.  The first line shows where the original crash
> > happened, the rest are a secondary crash when Emacs tried to shut down
> > itself.
> 
> What makes you think mark_interval is where the original crash happened?

Because the original backtrace reported by Drew said this:

  Exception 0xc0000005 at this address:
  0115f769

  Backtrace:
  01200a23
  01200a94
  ...

This is the exception handler installed by w32fns.c at work (see
my_exception_handler and globals_of_w32fns), and "Exception
0xc0000005" is invalid address exception (a.k.a. SIGSEGV).

> > Stefan, could this be related to your latest changes in intervals.c?
> 
> Could be, but we'd need more of the backtrace to figure out
> what's happening.

The only way to have more of the backtrace is to run Emacs under GDB
to begin with.  Without that, when Emacs hits a fatal exception like
that, one address is all you got.