[21.5-b28] Assertion failed at search.c:1487

I.Sheldon ian.sheldon at equiduct.eu
Thu Sep 27 10:08:18 EDT 2007


XEmacs consistently crashed when doing a yank in to an empty buffer
which had flyspell and font-lock-prog-mode enabled.  It didn't happen
if I used "xemacs -vanilla".  flyspell-version was 1.6h.  XEmacs
version was 21.5-b28 (+CVS-20070924).

A web search highlighted a few other people who had crashes in similar
places in search.c place, but with different backtraces.

I didn't find a fix posted, so perhaps this extra information will be
of use.

====

Fatal error: assertion failed, file search.c, line 1487, (this_pos) >
((Bytebpos) 1) && this_pos <= ((buf)->text->z + 0)


Lisp backtrace follows:

  # (unwind-protect ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  search-backward("Local IspellDict: " nil t)
  # bind (end)
  # (unwind-protect ...)
  ispell-buffer-local-dict()
  ispell-accept-buffer-local-defs()
  # bind (buf)
  flyspell-accept-buffer-local-defs()
  # (unwind-protect ...)
  # bind (following)
  flyspell-word()
  # (unwind-protect ...)
  # (unwind-protect ...)
  # bind (command)
  flyspell-post-command-hook()
  # (unwind-protect ...)
  # (catch #<INTERNAL OBJECT (XEmacs bug?) (opaque, size=0) 0x8389000> ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  (dispatch-event "[internal]")
  # (condition-case ... . error)
  # (catch top-level ...)




(gdb) where
#0  0xfe650ce7 in kill () from /lib/libc.so.1
#1  0x080e877a in fatal_error_signal (sig=6) at emacs.c:3800
#2  0xfe65051f in __sighndlr () from /lib/libc.so.1
#3  0xfe646a31 in call_user_handler () from /lib/libc.so.1
#4  <signal handler called>
#5  0xfe651157 in _lwp_kill () from /lib/libc.so.1
#6  0xfe64e8c9 in thr_kill () from /lib/libc.so.1
#7  0xfe5fd163 in raise () from /lib/libc.so.1
#8  0xfe5e0b40 in abort () from /lib/libc.so.1
#9  0x080e9b28 in really_abort () at emacs.c:4693
#10 0x080e8858 in assert_failed (file=0x82e2911 "search.c", line=1487, 
    expr=0x82e2fe4 "(this_pos) > ((Bytebpos) 1) && this_pos <= ((buf)->text->z + 0)") at emacs.c:3986
#11 0x0821bb7c in simple_search (buf=0x91e9c00, 
    base_pat=0x8044e50 "local ispelldict: ", len=18, pos=2, lim=1, n=-1, 
    trt=138708992) at search.c:1487
#12 0x0821b6cd in search_buffer (buf=0x91e9c00, string=147395428, charbpos=80, 
    buflim=1, n=-1, RE=0, trt=138708992, inverse_trt=138711040, posix=0)
    at search.c:1409
#13 0x0821ae27 in search_command (string=147395428, limit=137664516, 
    noerror=137664540, count=137664516, buffer=137664516, direction=-1, RE=0, 
    posix=0) at search.c:1155
#14 0x0821d222 in Fsearch_backward (string=147395428, limit=137664516, 
    noerror=137664540, count=137664516, buffer=137664516) at search.c:2122
#15 0x080f2013 in Ffuncall (nargs=4, args=0x8045134) at eval.c:3928
#16 0x080ac366 in execute_optimized_program (
    program=0x920cb90 "\212eb\210Æ\035db\210Ç\nÆÈ#«\032É\n!\210\212Æ\177\210`)\025ÊË\rÈ#«\bÌÍ\224Í\225\"\024db\210Ç\tÆÈ#«\032É\t!\210\212Æ\177\210`)\025ÊË\rÈ#«\bÌÍ\224Í\225\"\023*\v«\f\v\bk¬\aÎÈ!\210\v\020\f­\v\f\016\020k?­\004Ï\f!\207", 
    stack_depth=4, constants_data=0x8e48490) at bytecode.c:862
#17 0x080f1b19 in funcall_compiled_function (fun=148513652, nargs=0, 
    args=0x8045478) at eval.c:3517
#18 0x080f22ac in Ffuncall (nargs=1, args=0x8045474) at eval.c:3967
#19 0x080ac366 in execute_optimized_program (
    program=0x91bc570 "À \210Á \210Â \207", stack_depth=1, 
    constants_data=0x8cf7ed0) at bytecode.c:862
#20 0x080f1b19 in funcall_compiled_function (fun=148513564, nargs=0, 
    args=0x80457a8) at eval.c:3517
#21 0x080f22ac in Ffuncall (nargs=1, args=0x80457a4) at eval.c:3967
#22 0x080ac366 in execute_optimized_program (
    program=0x928b210 "p\033Æ \210\vq\210)\n\ra­\004\t\fa?­\025\r\022\f\021\f®\002\r\016\t¶«\005Ç\211\020\207È\211\020\207", stack_depth=2, 
    constants_data=0x8e5d1d0) at bytecode.c:862
#23 0x080f1b19 in funcall_compiled_function (fun=148514180, nargs=0, 
    args=0x8045ad8) at eval.c:3517
#24 0x080f22ac in Ffuncall (nargs=1, args=0x8045ad4) at eval.c:3967
#25 0x080ac366 in execute_optimized_program (
    program=0x92f8610 "t«\005\016,\026$\212Æ \210`\036%Ç\016$!\031È\211\035\034È\211\032\033\tÈa®\vÉ\016&!­\005\016& ??\205_\001\tA@\025\tAA@\024\t@\023\016'Êa«\r\reV«%\rSfËa¬\036\016-«\032\212\rb\210Ì\v\r\f\rZTZÍ#)«\tÎ\r\fÏ#\202$\001\016(\ra­\v\016)\fa­\005\016*\v\230?\205\020\001\016'Êa«\030Ð\t!«\023Ñ\r!\210\f\rV«\006Ñ\fS!\210Í\202ó", stack_depth=6, constants_data=0x8e9af10) at bytecode.c:862
#26 0x080f1b19 in funcall_compiled_function (fun=149532852, nargs=0, 
    args=0x8045e18) at eval.c:3517
#27 0x080f22ac in Ffuncall (nargs=1, args=0x8045e14) at eval.c:3967
#28 0x080ac366 in execute_optimized_program (
    program=0x9211b10 "\f\032Æ «\017\212\016\016q\210\212\016\017b\210Ç \210*È «\nÇ \210p\021`\020ª\021É\211\021\020\f9«\t\fÊN«\004Ë\026\020\r:«\037\r@@\r at A\036\r\033Ì\v\016\r\"«\t\212\vb\210Ç \210)\rA\025*ªß\n\211\026\021)\207", 
    stack_depth=4, constants_data=0x8e8ea10) at bytecode.c:862
#29 0x080f1b19 in funcall_compiled_function (fun=149532764, nargs=0, 
    args=0x80461e4) at eval.c:3517
#30 0x080f22ac in Ffuncall (nargs=1, args=0x80461e0) at eval.c:3967
#31 0x080f3216 in run_hook_with_args_in_buffer (buf=0x91e9c00, nargs=1, 
    args=0x80461e0, cond=RUN_HOOKS_TO_COMPLETION) at eval.c:4450
#32 0x080f32a9 in run_hook_with_args (nargs=1, args=0x80461e0, 
    cond=RUN_HOOKS_TO_COMPLETION) at eval.c:4463
#33 0x080f3508 in run_hook (hook=148515708) at eval.c:4532
#34 0x080f51c6 in safe_run_hook_trapping_problems_1 (puta=0x8363b64)
    at eval.c:5618
#35 0x080f40dd in call_trapping_problems_2 (opaque=142136000) at eval.c:4968
#36 0x080ee5bc in call_with_condition_handler (
    handler=0x80f4037 <flagged_a_squirmer>, handler_arg=142136000, 
    fun=0x80f40a7 <call_trapping_problems_2>, arg=142136000) at eval.c:2157
#37 0x080f40fe in call_trapping_problems_1 (opaque=142136000) at eval.c:4974
#38 0x080ed952 in internal_catch (tag=137924608, 
    func=0x80f40e2 <call_trapping_problems_1>, arg=142136000, threw=0x8046524, 
    thrown_tag=0x804652c, backtrace_before_throw=0x8046528) at eval.c:1552
#39 0x080f453a in call_trapping_problems (warning_class=137664612, 
    warning_string=0x0, flags=131203, problem=0x8046604, 
    fun=0x80f51af <safe_run_hook_trapping_problems_1>, arg=0x8363b64)
    at eval.c:5247
#40 0x080f5284 in safe_run_hook_trapping_problems (warning_class=137800836, 
    hook_symbol=137771876, flags=128) at eval.c:5640
#41 0x081090a6 in post_command_hook () at event-stream.c:4384
#42 0x08108e84 in execute_command_event (command_builder=0x8a11b40, 
    event=147327212) at event-stream.c:4291
#43 0x08109869 in Fdispatch_event (event=147327212) at event-stream.c:4592
#44 0x080bb1bf in Fcommand_loop_1 () at cmdloop.c:600
#45 0x080baf84 in command_loop_1 (unused_dummy=137664516) at cmdloop.c:505
#46 0x080ede97 in condition_case_1 (handlers=137664612, 
    bfun=0x80baf54 <command_loop_1>, barg=137664516, 
    hfun=0x80bab8b <cmd_error>, harg=137664516) at eval.c:1946
#47 0x080bacab in command_loop_3 () at cmdloop.c:262
#48 0x080bacce in command_loop_2 (unused_dummy=137664516) at cmdloop.c:275
#49 0x080ed952 in internal_catch (tag=137745300, 
    func=0x80bacc3 <command_loop_2>, arg=137664516, threw=0x0, thrown_tag=0x0, 
    backtrace_before_throw=0x0) at eval.c:1552
#50 0x080badb5 in initial_command_loop (load_me=137664516) at cmdloop.c:313
#51 0x080e7477 in xemacs_21_5_b28_i386_pc_solaris2_10 (argc=11, 
    argv=0x8046dc0, unused_envp=0x0, restart=0) at emacs.c:2667
#52 0x080e7de8 in main (argc=11, argv=0x8046dc0, unused_envp=0x8046df0)
    at emacs.c:3172




(gdb) print buf
$4 = (struct buffer *) 0x91e9c00
(gdb) print this_pos
$5 = 1
(gdb) print *buf
$6 = {header = {lheader = {type = 24, mark = 0, c_readonly = 0, 
      lisp_readonly = 0, uid = 1461832}, next = 0x91f8380, uid = 1461833, 
    free = 0}, own_text = {
    beg = 0xfe2b0000 "     #include <fcntl.h>\n     #include <sys/types.h>\n     #include <sys/stat.h>\n", gpt = 80, bufgpt = 80, z = 80, bufz = 80, 
    gap_size = 2001, end_gap_size = 0, modiff = 3, save_modiff = 2, 
    mule_charbpos_cache = {0 <repeats 50 times>}, mule_bytebpos_cache = {
      0 <repeats 50 times>}, next_cache_pos = 0, cached_charpos = 1, 
    cached_bytepos = 1, entirely_one_byte_p = 1, num_ascii_chars = 79, 
    num_8_bit_fixed_chars = 79, num_16_bit_fixed_chars = 79, 
    format = FORMAT_DEFAULT, line_number_cache = 137664516, 
    changes = 0x91c0160}, text = 0x91e9c0c, pt = 80, bufpt = 80, begv = 1, 
  bufbegv = 1, zv = 80, bufzv = 80, face_change = 1, 
  buffer_local_face_property = 0, changes = 0x91c00a0, markers = 0x8755f0c, 
  extent_info = 152830400, syntax_cache = 0x91da140, base_buffer = 0x0, 
  indirect_children = 137664516, local_var_flags = -1, modtime = -1, 
  auto_save_modified = 3, auto_save_failure_time = -1, last_window_start = 1, 
  name = 153088868, filename = 153089140, directory = 153089492, 
  backed_up = 137664516, saved_size = 159, auto_save_file_name = 153101012, 
  read_only = 137664516, mark = 142044724, local_var_alist = 154138784, 
  major_mode = 140182636, mode_name = 148669124, modeline_format = 139856560, 
  keymap = 153112704, abbrev_table = 153395456, syntax_table = 152584192, 
  mirror_syntax_table = 152586240, category_table = 138702848, 
  buffer_file_coding_system = 139944396, case_fold_search = 137664540, 
  tab_width = 17, fill_column = 141, left_margin = 1, 
  auto_fill_function = 137664516, case_table = 138698592, 
  truncate_lines = 137664516, ctl_arrow = 140503476, 
  selective_display = 137664516, selective_display_ellipses = 137664540, 
  overwrite_mode = 137664516, abbrev_mode = 137664540, undo_list = 153812640, 
  file_format = 137664516, point_marker = 142044748, 
  point_before_scroll = 137664516, file_truename = 153089140, 
  invisibility_spec = 137664540, generated_modeline_string = 153088884, 
  modeline_extent_table = 152936704}




(gdb) print *buf->text
$3 = {
  beg = 0xfe2c0000 "     #include <fcntl.h>\n     #include <sys/types.h>\n     #include <sys/stat.h>\n", gpt = 80, bufgpt = 80, z = 80, bufz = 80, 
  gap_size = 2001, end_gap_size = 0, modiff = 3, save_modiff = 2, 
  mule_charbpos_cache = {0 <repeats 50 times>}, mule_bytebpos_cache = {
    0 <repeats 50 times>}, next_cache_pos = 0, cached_charpos = 1, 
  cached_bytepos = 1, entirely_one_byte_p = 1, num_ascii_chars = 79, 
  num_8_bit_fixed_chars = 79, num_16_bit_fixed_chars = 79, 
  format = FORMAT_DEFAULT, line_number_cache = 137664516, changes = 0x8e217c0}



describe-installation

uname -a: SunOS mifextest9 5.10 Generic_125101-10 i86pc i386 i86pc Solaris

./configure  '--with-compiler=gcc -g -I/opt/csw/include -I/opt/csw/include/freetype2 -I/opt/csw/include -I/opt/csw/include -I/opt/csw/include -L/opt/csw/lib -lXft -lX11 -L/opt/csw/lib -R/opt/csw/lib -lfreetype -lz -L/opt/csw/lib -lfontconfig -R/usr/openwin/lib -L/opt/csw/lib -L/usr/openwin/lib -lXrender -lX11 -lm' '--prefix=/export/home/ian/opt/i386-pc-solaris2.8/xemacs-cvs' '--with-site-prefixes=/opt/csw' '--with-sound=native,nonas,noesd' '--with-ldap=no' '--with-postgresql=no' '--with-database=dbm' '--with-ncurses' '--with-widgets=athena' '--with-dialogs=athena' '--with-mule' '--with-xft=emacs,menubars,tabs,gauges' '--without-xim' '--with-bignum=gmp' 'CC=cc'


XEmacs 21.5-b28 "fuki" (+CVS-20070924) configured for `i386-pc-solaris2.10'.

Compilation Environment and Installation Defaults:
  Source code location:              /export/home/ian/apps/xemacs-cvs/xemacs-21.5
  Installation prefix:               /export/home/ian/opt/i386-pc-solaris2.8/xemacs-cvs
  Additional prefixes:               /opt/csw
  Runtime library search path:       /opt/csw/lib:/usr/openwin/lib:/opt/csw/gcc4/lib:/usr/ccs/lib:/opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.0.2/../../..
  Operating system description file: `s/sol2.h'
  Machine description file:          `m/intel386.h'
  Compiler version:                  gcc (GCC) 4.0.2
    - GCC specs file:                /opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.0.2/specs
    - Compiler command:              gcc -g -I/opt/csw/include -I/opt/csw/include/freetype2 -I/opt/csw/include -I/opt/csw/include -I/opt/csw/include -L/opt/csw/lib -lXft -lX11 -L/opt/csw/lib -R/opt/csw/lib -lfreetype -lz -L/opt/csw/lib -lfontconfig -R/usr/openwin/lib -L/opt/csw/lib -L/usr/openwin/lib -lXrender -lX11 -lm   -Wall -Wno-switch -Wundef -Wsign-compare -Wno-char-subscripts -Wpacked -Wpointer-arith -Wunused-parameter -g  
  libc version:                      SUNWcsl 11.10.0,REV=2005.01.21.16.34
  Relocating allocator for buffers:  yes
  GNU version of malloc:             yes

Window System:
  Compiling in support for the X window system:
    - X Windows headers location:                 /usr/X11/include
    - X Windows libraries location:               /usr/openwin/lib
    - Handling WM_COMMAND properly.
    - Using fontconfig to manage fonts.
    - Compiling in support for Xft antialiased fonts (EXPERIMENTAL).
  Compiling in support for the Athena widget set:
    - Athena headers location:                    X11/Xaw
    - Athena library to link:                     Xaw
  Using Lucid menubars.
    - Using Xft to render antialiased fonts in menubars.
      WARNING: This feature will be replaced with a face.
  Using Lucid scrollbars.
  Using Athena dialog boxes.
  Using Athena native widgets.
    - Using Xft to render antialiased fonts in tab controls.
      WARNING: This feature will be replaced with a face.
    - Using Xft to render antialiased fonts in progress bars.
      WARNING: This feature will be replaced with a face.
      WARNING: This feature not yet implemented; setting ignored.

TTY:
  Compiling in support for ncurses.

Images:
  Compiling in support for GIF  images (builtin).
  Compiling in support for XPM  images.
  Compiling in support for PNG  images.
  Compiling in support for JPEG images.
  Compiling in support for TIFF images.

Sound:

Databases:
  Compiling in support for Berkeley database.
  Compiling in support for GNU DBM.

Internationalization:
  Compiling in support for Mule (multi-lingual Emacs).

Mail:
  Compiling in support for "file" mail spool file locking method.

Other Features:
  Inhibiting IPv6 canonicalization at startup.
  Compiling in support for ToolTalk.
  Compiling in support for dynamic shared object modules.
  Compiling in support for more number types using the GNU MP library.
  Using the new GC mark algorithms (KKCC).
  WARNING: ---------------------------------------------------------
  WARNING: The new algorithms are experimental. They are enabled by
  WARNING: default for this release. Use `--disable-kkcc' to
  WARNING: turn it off.
  WARNING: ---------------------------------------------------------
  Compiling in support for extra debugging code.
  Compiling in support for runtime error checking.
  WARNING: ---------------------------------------------------------
  WARNING: XEmacs will run noticeably more slowly as a result.
  WARNING: Error checking is on by default for XEmacs beta releases.
  WARNING: ---------------------------------------------------------



More information about the XEmacs-Beta mailing list