unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#15898: Emacs aborts in buf_charpos_to_bytepos
@ 2013-11-14 21:50 Barry OReilly
  2013-11-15  7:39 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Barry OReilly @ 2013-11-14 21:50 UTC (permalink / raw)
  To: 15898

[-- Attachment #1: Type: text/plain, Size: 9161 bytes --]

I updated my Emacs to the latest trunk, built bootstrap, and
approximately an hour later it core dumped.

Program terminated with signal 6, Aborted.
#0  0x00000031cfc0e7fd in raise () from /lib64/libpthread.so.0
(gdb) bt
#0  0x00000031cfc0e7fd in raise () from /lib64/libpthread.so.0
#1  0x0000000000503875 in terminate_due_to_signal (sig=6,
backtrace_limit=2147483647) at emacs.c:377
#2  0x0000000000569274 in die (msg=<value optimized out>, file=<value
optimized out>, line=<value optimized out>) at alloc.c:6726
#3  0x0000000000537a77 in buf_charpos_to_bytepos (b=0x180761e0,
charpos=26969) at marker.c:145
#4  0x0000000000554190 in find_newline (start=26969, start_byte=26918,
end=26939, end_byte=<value optimized out>, count=1,
shortage=0x7fffdaac9598, bytepos=0x0, allow_quit=true) at search.c:701
#5  0x000000000055531e in find_before_next_newline (from=16655, to=6,
cnt=128, bytepos=0x0) at search.c:902
#6  0x000000000057fbb4 in Fline_end_position (n=<value optimized out>) at
editfns.c:812
#7  0x000000000054aafe in Fend_of_line (n=16655) at cmds.c:199
#8  0x00000000005c70a2 in exec_byte_code (bytestr=16655, vector=16655,
maxdepth=6, args_template=12849010, nargs=0, args=0x7f) at bytecode.c:1751
#9  0x0000000000589f2c in funcall_lambda (fun=357705693, nargs=0,
arg_vector=0x7fffdaac9770) at eval.c:3039
#10 0x000000000058a1ec in Ffuncall (nargs=1, args=<value optimized out>) at
eval.c:2866
#11 0x00000000005c6400 in exec_byte_code (bytestr=16655, vector=16655,
maxdepth=6, args_template=12849010, nargs=0, args=0x20) at bytecode.c:919
#12 0x0000000000589f2c in funcall_lambda (fun=358448597, nargs=0,
arg_vector=0x7fffdaac9900) at eval.c:3039
#13 0x000000000058a1ec in Ffuncall (nargs=1, args=<value optimized out>) at
eval.c:2866
#14 0x00000000005c6400 in exec_byte_code (bytestr=16655, vector=16655,
maxdepth=6, args_template=12849010, nargs=0, args=0x20) at bytecode.c:919
#15 0x0000000000589f2c in funcall_lambda (fun=359169677, nargs=3,
arg_vector=0x7fffdaac9ab0) at eval.c:3039
#16 0x000000000058a1ec in Ffuncall (nargs=4, args=<value optimized out>) at
eval.c:2866
#17 0x00000000005c6400 in exec_byte_code (bytestr=16655, vector=16655,
maxdepth=6, args_template=12849010, nargs=0, args=0x23) at bytecode.c:919
#18 0x0000000000589f2c in funcall_lambda (fun=359170213, nargs=1,
arg_vector=0x7fffdaac9c48) at eval.c:3039
#19 0x000000000058a1ec in Ffuncall (nargs=2, args=<value optimized out>) at
eval.c:2866
#20 0x000000000058a85a in call1 (fn=<value optimized out>, arg1=<value
optimized out>) at eval.c:2604
#21 0x0000000000591ebe in mapcar1 (leni=2, vals=0x0, fn=359170213, seq=-1)
at fns.c:2294
#22 0x0000000000592007 in Fmapc (function=359170213, sequence=358355174) at
fns.c:2383
#23 0x000000000058a60f in Ffuncall (nargs=3, args=<value optimized out>) at
eval.c:2808
#24 0x00000000005c6400 in exec_byte_code (bytestr=16655, vector=16655,
maxdepth=6, args_template=12849010, nargs=0, args=0x22) at bytecode.c:919
#25 0x0000000000589f2c in funcall_lambda (fun=359170581, nargs=3,
arg_vector=0x7fffdaac9f28) at eval.c:3039
#26 0x000000000058a1ec in Ffuncall (nargs=4, args=<value optimized out>) at
eval.c:2866
#27 0x000000000058a8f9 in funcall_nil (nargs=16655, args=0x410f) at
eval.c:2356
#28 0x00000000005879d0 in run_hook_with_args (nargs=4, args=0x7fffdaac9f20,
funcall=0x58a8f0 <funcall_nil>) at eval.c:2541
#29 0x0000000000533918 in signal_after_change (charpos=26603, lendel=31,
lenins=0) at insdel.c:2069
#30 0x00000000005367f6 in del_range_byte (from_byte=<value optimized out>,
to_byte=<value optimized out>, prepare=false) at insdel.c:1632
#31 0x00000000005441eb in Finsert_file_contents (filename=<value optimized
out>, visit=12849058, beg=12849010, end=12849010, replace=12849058) at
fileio.c:4019
#32 0x000000000058a6cf in Ffuncall (nargs=6, args=<value optimized out>) at
eval.c:2821
#33 0x00000000005c6400 in exec_byte_code (bytestr=16655, vector=16655,
maxdepth=6, args_template=2056, nargs=2, args=0x25) at bytecode.c:919
#34 0x000000000058a1ec in Ffuncall (nargs=3, args=<value optimized out>) at
eval.c:2866
#35 0x00000000005c6400 in exec_byte_code (bytestr=16655, vector=16655,
maxdepth=6, args_template=2056, nargs=2, args=0x22) at bytecode.c:919
#36 0x000000000058a1ec in Ffuncall (nargs=3, args=<value optimized out>) at
eval.c:2866
#37 0x00000000005c6400 in exec_byte_code (bytestr=16655, vector=16655,
maxdepth=6, args_template=3072, nargs=3, args=0x22) at bytecode.c:919
#38 0x000000000058a1ec in Ffuncall (nargs=4, args=<value optimized out>) at
eval.c:2866
#39 0x00000000005c6400 in exec_byte_code (bytestr=16655, vector=16655,
maxdepth=6, args_template=12849010, nargs=0, args=0x23) at bytecode.c:919
#40 0x0000000000589f2c in funcall_lambda (fun=18789701, nargs=0,
arg_vector=0x7fffdaadaaf0) at eval.c:3039
#41 0x000000000058a1ec in Ffuncall (nargs=1, args=<value optimized out>) at
eval.c:2866
#42 0x00000000005c6400 in exec_byte_code (bytestr=16655, vector=16655,
maxdepth=6, args_template=12849010, nargs=0, args=0x20) at bytecode.c:919
#43 0x0000000000589f2c in funcall_lambda (fun=18789925, nargs=0,
arg_vector=0x7fffdaadad48) at eval.c:3039
#44 0x000000000058a1ec in Ffuncall (nargs=1, args=<value optimized out>) at
eval.c:2866
#45 0x000000000058ac43 in Fapply (nargs=2, args=0x7fffdaadad40) at
eval.c:2287
#46 0x000000000058a46c in Ffuncall (nargs=3, args=<value optimized out>) at
eval.c:2786
#47 0x00000000005c6400 in exec_byte_code (bytestr=16655, vector=16655,
maxdepth=6, args_template=12849010, nargs=0, args=0x22) at bytecode.c:919
#48 0x0000000000589879 in eval_sub (form=<value optimized out>) at
eval.c:2181
#49 0x000000000058cdca in internal_lisp_condition_case (var=16915058,
bodyform=10187926, handlers=<value optimized out>) at eval.c:1313
#50 0x00000000005c7f0d in exec_byte_code (bytestr=16655, vector=16655,
maxdepth=6, args_template=12849010, nargs=0, args=0x8f) at bytecode.c:1169
#51 0x0000000000589f2c in funcall_lambda (fun=10187613, nargs=1,
arg_vector=0x7fffdaadb118) at eval.c:3039
#52 0x000000000058a1ec in Ffuncall (nargs=2, args=<value optimized out>) at
eval.c:2866
#53 0x000000000058a85a in call1 (fn=<value optimized out>, arg1=<value
optimized out>) at eval.c:2604
#54 0x000000000050b7df in timer_check_2 () at keyboard.c:4508
#55 timer_check () at keyboard.c:4575
#56 0x000000000050babc in readable_events (flags=1) at keyboard.c:3442
#57 0x000000000050c718 in get_input_pending (flags=1) at keyboard.c:6745
#58 0x000000000050c7af in detect_input_pending_run_timers (do_display=true)
at keyboard.c:9870
#59 0x00000000005ce232 in wait_reading_process_output (time_limit=<value
optimized out>, nsecs=0, read_kbd=-1, do_display=true,
wait_for_cell=12849010, wait_proc=0x0, just_wait_proc=0) at process.c:4679
#60 0x0000000000510e3c in kbd_buffer_get_event (end_time=0x0,
local_getcjmp=0x7fffdaadbac0, prev_event=12849010,
used_mouse_menu=0x7fffdaadbd3f) at keyboard.c:3900
#61 read_event_from_main_queue (end_time=0x0, local_getcjmp=0x7fffdaadbac0,
prev_event=12849010, used_mouse_menu=0x7fffdaadbd3f) at keyboard.c:2241
#62 read_decoded_event_from_main_queue (end_time=0x0,
local_getcjmp=0x7fffdaadbac0, prev_event=12849010,
used_mouse_menu=0x7fffdaadbd3f) at keyboard.c:2306
#63 0x00000000005159e1 in read_char (commandflag=1, map=404497478,
prev_event=12849010, used_mouse_menu=0x7fffdaadbd3f, end_time=0x0) at
keyboard.c:2890
#64 0x0000000000516ce5 in read_key_sequence (keybuf=0x7fffdaadbdb0,
bufsize=30, prompt=12849010, dont_downcase_last=false,
can_return_switch_frame=true, fix_current_buffer=true,
prevent_redisplay=false)
    at keyboard.c:9065
#65 0x000000000051912e in command_loop_1 () at keyboard.c:1444
#66 0x000000000058807a in internal_condition_case (bfun=0x518e10
<command_loop_1>, handlers=12900034, hfun=0x50f550 <cmd_error>) at
eval.c:1344
---Type <return> to continue, or q <return> to quit---
#67 0x000000000050d9ea in command_loop_2 (ignore=<value optimized out>) at
keyboard.c:1169
#68 0x0000000000587f58 in internal_catch (tag=12895970, func=0x50d9d0
<command_loop_2>, arg=12849010) at eval.c:1108
#69 0x000000000050d8f0 in command_loop () at keyboard.c:1148
#70 recursive_edit_1 () at keyboard.c:776
#71 0x000000000050ea17 in Frecursive_edit () at keyboard.c:840
#72 0x0000000000504dfd in main (argc=<value optimized out>,
argv=0x7fffdaadc128) at emacs.c:1594
(gdb)
(gdb) f 3
#3  0x0000000000537a77 in buf_charpos_to_bytepos (b=0x180761e0,
charpos=26969) at marker.c:145
145       eassert (BUF_BEG (b) <= charpos && charpos <= BUF_Z (b));
(gdb) p BUF_BEG(b)
$1 = 1
(gdb) p charpos
$2 = 26969
(gdb) p BUF_Z(b)
$3 = 26939
(gdb)

Specifically, I updated from:

commit a5088c77a2520d2f81b6ea842e04c229b96adf7e
Author: Xue Fuqiao <xfq.free@gmail.com>
Date:   Fri Oct 18 22:27:44 2013 +0800

    Another index for line height.

To:

commit daa505e5f4ef7d6a6aab6fb5f64faa1a75ee4d10
Author: Kazuhiro Ito <kzhr@d1.dion.ne.jp>
Date:   Thu Nov 14 19:43:49 2013 +0200

    Fix bug #15892 with link failures of the Cygwin w32 build.

     src/keyboard.c (make_ctrl_char) [HAVE_NTGUI]: Now externally visible
     for Cygwin w32 build.
     src/xdisp.c (erase_phys_cursor) [HAVE_NTGUI]: Now externally visible
     for Cygwin w32 build.

OS is RHEL 5.

[-- Attachment #2: Type: text/html, Size: 9959 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#15898: Emacs aborts in buf_charpos_to_bytepos
  2013-11-14 21:50 bug#15898: Emacs aborts in buf_charpos_to_bytepos Barry OReilly
@ 2013-11-15  7:39 ` Eli Zaretskii
  2013-11-15 15:25   ` Barry OReilly
  2013-11-15 16:57   ` Barry OReilly
  0 siblings, 2 replies; 5+ messages in thread
From: Eli Zaretskii @ 2013-11-15  7:39 UTC (permalink / raw)
  To: Barry OReilly; +Cc: 15898

> Date: Thu, 14 Nov 2013 16:50:37 -0500
> From: Barry OReilly <gundaetiapo@gmail.com>
> 
> I updated my Emacs to the latest trunk, built bootstrap, and
> approximately an hour later it core dumped.
> 
> Program terminated with signal 6, Aborted.
> #0  0x00000031cfc0e7fd in raise () from /lib64/libpthread.so.0
> (gdb) bt
> #0  0x00000031cfc0e7fd in raise () from /lib64/libpthread.so.0
> #1  0x0000000000503875 in terminate_due_to_signal (sig=6,
> backtrace_limit=2147483647) at emacs.c:377
> #2  0x0000000000569274 in die (msg=<value optimized out>, file=<value
> optimized out>, line=<value optimized out>) at alloc.c:6726
> #3  0x0000000000537a77 in buf_charpos_to_bytepos (b=0x180761e0,
> charpos=26969) at marker.c:145
> #4  0x0000000000554190 in find_newline (start=26969, start_byte=26918,
> end=26939, end_byte=<value optimized out>, count=1,
> shortage=0x7fffdaac9598, bytepos=0x0, allow_quit=true) at search.c:701
> #5  0x000000000055531e in find_before_next_newline (from=16655, to=6,
> cnt=128, bytepos=0x0) at search.c:902
> #6  0x000000000057fbb4 in Fline_end_position (n=<value optimized out>) at
> editfns.c:812

This looks like another duplicate of 15841, but that would imply that
your previous update was before revno 115033, which was committed
quite some time ago.  Can you tell if that was indeed so?





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#15898: Emacs aborts in buf_charpos_to_bytepos
  2013-11-15  7:39 ` Eli Zaretskii
@ 2013-11-15 15:25   ` Barry OReilly
  2013-11-15 16:39     ` Eli Zaretskii
  2013-11-15 16:57   ` Barry OReilly
  1 sibling, 1 reply; 5+ messages in thread
From: Barry OReilly @ 2013-11-15 15:25 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 15898

[-- Attachment #1: Type: text/plain, Size: 264 bytes --]

> This looks like another duplicate of 15841, but that would imply
> that your previous update was before revno 115033, which was
> committed quite some time ago. Can you tell if that was indeed so?

That's correct, I updated from before revno 115033 to after it.

[-- Attachment #2: Type: text/html, Size: 354 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#15898: Emacs aborts in buf_charpos_to_bytepos
  2013-11-15 15:25   ` Barry OReilly
@ 2013-11-15 16:39     ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2013-11-15 16:39 UTC (permalink / raw)
  To: Barry OReilly; +Cc: 15898, control

merge 15898 15841
thanks

> Date: Fri, 15 Nov 2013 10:25:16 -0500
> From: Barry OReilly <gundaetiapo@gmail.com>
> Cc: 15898@debbugs.gnu.org
> 
> > This looks like another duplicate of 15841, but that would imply
> > that your previous update was before revno 115033, which was
> > committed quite some time ago. Can you tell if that was indeed so?
> 
> That's correct, I updated from before revno 115033 to after it.

Thanks.  In that case, perhaps you, too, could try the patch I
suggested there just a few minutes ago.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#15898: Emacs aborts in buf_charpos_to_bytepos
  2013-11-15  7:39 ` Eli Zaretskii
  2013-11-15 15:25   ` Barry OReilly
@ 2013-11-15 16:57   ` Barry OReilly
  1 sibling, 0 replies; 5+ messages in thread
From: Barry OReilly @ 2013-11-15 16:57 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 15898

[-- Attachment #1: Type: text/plain, Size: 727 bytes --]

Not having applied your patch yet, I reproduced the core dump in GDB and
got a Lisp backtrace:

"line-end-position" (0xfffe9cc0)
"back-to-indentation" (0xfffe9de0)
"c-beginning-of-macro" (0xfffe9f70)
"c-extend-font-lock-region-for-macros" (0xfffea110)
"c-neutralize-syntax-in-and-mark-CPP" (0xfffea2c0)
0x1c01cb0 PVEC_COMPILED
"mapc" (0xfffea540)
"c-after-change" (0xfffea738)
"insert-file-contents" (0xffffad40)
"revert-buffer-insert-file-contents--default-function" (0xffffaec0)
"revert-buffer--default" (0xffffb028)
"revert-buffer" (0xffffb160)
"auto-revert-handler" (0xffffb300)
"auto-revert-buffers" (0xffffb558)
"apply" (0xffffb550)
"byte-code" (0xffffb660)
"timer-event-handler" (0xffffb928)

I'll apply your patch now.

[-- Attachment #2: Type: text/html, Size: 989 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-11-15 16:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-14 21:50 bug#15898: Emacs aborts in buf_charpos_to_bytepos Barry OReilly
2013-11-15  7:39 ` Eli Zaretskii
2013-11-15 15:25   ` Barry OReilly
2013-11-15 16:39     ` Eli Zaretskii
2013-11-15 16:57   ` Barry OReilly

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).