Subject: bug#10159: 24.0.91; Segfault with auto-complete package [SEC=UNCLASSIFIED]

From: Eli Zaretskii <[email-masked]>
Date: Tue, 06 Dec 2011 01:31:25 -0500

> Date: Tue, 06 Dec 2011 16:17:40 +1030
> From: Alex Murray <[email-masked]>
> Cc: [email-masked]
> 
> Okay have managed to reproduce the crash without any optimizations and 
> am including the first few stack frames in line - see attached for the 
> entire gdb backtrace full output
> 
> #0  0x0000000000687832 in composition_compute_stop_pos 
> (cmp_it=0x7fffffff9018,
>      charpos=74, bytepos=86, endpos=100, string=44875745) at 
> composite.c:1073
>          elt = 44875745
>          ridx = 0
>          start = 0
>          end = 21769088
>          c = 11542528
>          prop = 12818946
>          val = 390
>          MAX_NEWLINE_DISTANCE = 500

Very strange.  `string' seems to be a Lisp string (because this was
called from next_element_from_string), which is consistent with
`start' being zero.  But why does `c' have such a preposterous value,
and why is `elt' identical to `string'?  In any case, the immediate
cause of the crash is probably the bogus value of `val'.

Please show the other important info:

 . What does "M-x emacs-version RET" display?  This is important to
   correlate the line numbers in the backtrace with source files in
   the Emacs repository.

 . What did GDB display when Emacs crashed?  That would be the text
   just before you typed the "bt full" command, the most important
   information there is the fatal signal that caused the crash.

In addition, can you please show the output of the following GDB
commands?  (You will need to type "source /path/to/.gdbinit" command
before these, as some of these commands are defined in src/.gdbinit in
the Emacs tree.  If you don't have that file in the snapshot
distribution you downloaded, you can find it here:

   http://bzr.savannah.gnu.org/lh/emacs/trunk/annotate/head:/src/.gdbinit

There's a "download" link on that page to download the file.)

Here are the GDB commands to use:

 (gdb) p string
 (gdb) xtype

If the last command says `string' is a Lisp_String object, please type
yet another command immediately after "xtype":

 (gdb) xstring

Thanks.