Subject: bug#24640: Crashes in 25.1

From: Eli Zaretskii <[email-masked]>
Date: Sat, 08 Oct 2016 08:53:58 +0300

> From: Reuben Thomas <[email-masked]>
> Date: Sat, 8 Oct 2016 00:12:26 +0100
> 
> In both cases, the crash occurs while Emacs is lazy-loading my desktop.

What does "lazy-loading" mean in this context?

> I can't tell exactly what it's doing, but it appears to be about the
> same place each time.

If you run Emacs under GDB, and source the src/.gdbinit file provided
in the source tree, the backtrace command will automatically try to
produce a Lisp-level backtrace as well.  That could be helpful.

This string in the 1st backtrace you show could help figure out what
form was being evaluated:

  #41 0x000000000059af2d in read_process_output (coding=0x53b3920, nbytes=652, chars=0x7fff0376eaa0
  "Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\\\\begin{
  <-- HERE tex}(.*?)\\\\end{tex}/ at /usr/bin/texify line 521.\nUnescaped left brace in regex is depre"..., p=0x287)
  at process.c:5440

The SIGSEGV happens here:

      nextsym:
	if (ptr->gcmarkbit)  <<<<<<<<<<<<<<<<<<
	  break;

So the value of 'ptr' there (frame 20 in the 1st backtrace) is of
interest.

> ​I tried ​building the current emacs-25 branch with ./configure --with-xwidgets --with-cairo --with-modules, I get
> a different crash:
> [...]
> #6 0x00007f1fd486a3d0 in <signal handler called> () at /lib/x86_64-linux-gnu/libpthread.so.0
> #7 0x000000000056dd24 in sxhash (y=<error reading variable: Cannot access memory at address 0x0>,
> x=0) at lisp.h:2025
> #8 0x000000000056dd24 in sxhash (len=<optimised out>, ptr=<optimised out>) at fns.c:4246

This part of the backtrace, right before the SIGSEGV, makes no sense:
the code at line 2025 of lisp.h does bitwise operations on scalar
values, and y is one such scalar value.  Please build without
optimizations, that would make the backtraces more reliable and
detailed.

Was the Ubuntu package also compiled with Cairo?  (I cannot figure out
the build details from the URL you provided, and your report lacks the
details collected by "M-x report-emacs-bug".)  If so, please try
building without Cairo, as that option is not yet recommended for
prime time.

Thanks.