bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12426: 24.2.50; Emacs is closed unexpectedly after query-replace


From: Eli Zaretskii
Subject: bug#12426: 24.2.50; Emacs is closed unexpectedly after query-replace
Date: Wed, 12 Sep 2012 22:02:11 +0300

> Date: Wed, 12 Sep 2012 21:39:47 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 12426@debbugs.gnu.org
> 
> > Date: Wed, 12 Sep 2012 20:06:03 +0200
> > From: Dani Moncayo <dmoncayo@gmail.com>
> > 
> > Recipe from emacs -Q:  a <SPC> b M-a M-% a <SPC> b <RET> c <RET> <SPC>
> > 
> > After doing that, my Emacs session suddenly ends.
> 
> It exits due to an assertion violation.  Looks like the recent changes
> that introduced fatal_error_backtrace are a misfeature on Windows.
> 
> I'm looking at the reason for the assertion violation; the
> fatal_error_backtrace thingy is next.

The reason for the assertion violation is the assertion in
marker_position:

  eassert (BUF_BEG (buf) <= m->charpos && m->charpos <= BUF_Z (buf));

This was introduced recently by Dmitry, in revision 108906.  A similar
assertion was added to marker_byte_position.

Dmitry, why did you add them?  Who said that a marker cannot
legitimately have a position outside of its buffer's range of
character positions?

For the record, here's the backtrace that leads to the assertion:

  (gdb) bt
  #0  0x01332b80 in exit ()
  #1  0x01001447 in fatal_error_backtrace (sig=22, backtrace_limit=2147483647)
      at emacs.c:335
  #2  0x01043379 in die (
      msg=0x156236c "assertion failed: BUF_BEG (buf) <= m->charpos && 
m->charpos <= BUF_Z (buf)", file=0x1561e66 "marker.c", line=637) at alloc.c:6749
  #3  0x0110ebd6 in marker_position (marker=55669099) at marker.c:637
  #4  0x010ce3a9 in recenter_overlay_lists (buf=0x3447e00, pos=192)
      at buffer.c:3432
  #5  0x010cebd3 in adjust_overlays_for_delete (pos=192, length=3)
      at buffer.c:3555
  #6  0x011128ad in replace_range (from=192, to=195, new=56457521,
      prepare=true, inherit=false, markers=true) at insdel.c:1399
  #7  0x01104833 in Freplace_match (newtext=56457521, fixedcase=54794266,
      literal=54794290, string=54794266, subexp=54794266) at search.c:2622
  #8  0x0103652c in Ffuncall (nargs=4, args=0x82f0f4) at eval.c:2826
  #9  0x0112664f in exec_byte_code (bytestr=21187937, vector=21188029,
      maxdepth=32, args_template=54794266, nargs=0, args=0x0) at bytecode.c:898
  #10 0x01037261 in funcall_lambda (fun=21187877, nargs=5, arg_vector=0x82f368)
      at eval.c:3042
  #11 0x0103674b in Ffuncall (nargs=6, args=0x82f364) at eval.c:2859
  #12 0x0112664f in exec_byte_code (bytestr=21188625, vector=21189325,
      maxdepth=44, args_template=54794266, nargs=0, args=0x0) at bytecode.c:898
  #13 0x01037261 in funcall_lambda (fun=21188533, nargs=9, arg_vector=0x82f5d8)
      at eval.c:3042
  #14 0x0103674b in Ffuncall (nargs=10, args=0x82f5d4) at eval.c:2859
  #15 0x0112664f in exec_byte_code (bytestr=21172369, vector=21172429,
      maxdepth=40, args_template=54794266, nargs=0, args=0x0) at bytecode.c:898
  #16 0x01037261 in funcall_lambda (fun=21172309, nargs=5, arg_vector=0x82f844)
      at eval.c:3042
  #17 0x0103674b in Ffuncall (nargs=6, args=0x82f840) at eval.c:2859
  #18 0x01035550 in Fapply (nargs=2, args=0x82f8f0) at eval.c:2340
  #19 0x01035ad4 in apply1 (fn=57177114, arg=58780478) at eval.c:2578
  #20 0x011238ae in Fcall_interactively (function=57177114,
      record_flag=54794266, keys=54815661) at callint.c:378
  #21 0x01036424 in Ffuncall (nargs=4, args=0x82fb30) at eval.c:2817
  #22 0x01035ba9 in call3 (fn=54911794, arg1=57177114, arg2=54794266,
      arg3=54794266) at eval.c:2635
  #23 0x010200e2 in Fcommand_execute (cmd=57177114, record_flag=54794266,
      keys=54794266, special=54794266) at keyboard.c:10378
  #24 0x010065e5 in command_loop_1 () at keyboard.c:1626
  #25 0x01032221 in internal_condition_case (bfun=0x100588b <command_loop_1>,
      handlers=54844922, hfun=0x100506e <cmd_error>) at eval.c:1319
  #26 0x010054c8 in command_loop_2 (ignore=54794266) at keyboard.c:1193
  #27 0x01031be3 in internal_catch (tag=54834754,
      func=0x10054a5 <command_loop_2>, arg=54794266) at eval.c:1076
  #28 0x01005480 in command_loop () at keyboard.c:1172
  #29 0x01004a2c in recursive_edit_1 () at keyboard.c:793
  #30 0x01004d4e in Frecursive_edit () at keyboard.c:857
  #31 0x010029d5 in main (argc=2, argv=0xa42808) at emacs.c:1660

  Lisp Backtrace:
  "replace-match" (0x82f0f8)
  "replace-match-maybe-edit" (0x82f368)
  "perform-replace" (0x82f5d8)
  "query-replace" (0x82f844)
  "call-interactively" (0x82fb34)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]