Subject: bug#15898: closed (Re: bug#15841: Display bugs with cache-long-lines non-nil)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 18 Nov 2013 16:33:08 +0000

Your bug report

#15841: Emacs aborts in buf_charpos_to_bytepos

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
15841: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15841
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#15841: Display bugs with cache-long-lines non-nil
From: Eli Zaretskii <[email-masked]>
To: Andy Moreton <[email-masked]>, Stephen Berman <[email-masked]>
Cc: [email-masked]
Date: Mon, 18 Nov 2013 18:32:05 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Stephen Berman <[email-masked]>
> Cc: [email-masked]
> Date: Fri, 15 Nov 2013 19:05:42 +0100
> 
> Initial tests succeeded: `i' in Dired works as expected and there is no
> infloop or display oddities.  I'll report back if any problems crop up
> on further use.  Otherwise, thanks for fixing this!

No further problems, so I committed the changes as trunk revision
115138, and I'm closing this bug.

Subject: Emacs aborts in buf_charpos_to_bytepos
From: Barry OReilly <[email-masked]>
To: [email-masked]
Date: Thu, 14 Nov 2013 16:50:37 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

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 <[email-masked]>
Date:   Fri Oct 18 22:27:44 2013 +0800

    Another index for line height.

To:

commit daa505e5f4ef7d6a6aab6fb5f64faa1a75ee4d10
Author: Kazuhiro Ito <[email-masked]>
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.