Article View: gnu.emacs.bug
Article #98803Bug in Emacs 18.57 dispnew.c
From: Roland Bergler
Date: Fri, 01 Mar 1991 11:12
Date: Fri, 01 Mar 1991 11:12
66 lines
3711 bytes
3711 bytes
I think i found a bug in dispnew.c for emacs.18.57.
I'm running SCO unix V r3.vr2 on an 386 using gcc1.39.
In some cases, when scrolling in Window with process output of make
containing very long line (i.e. make of emacs itself),
emacs begins emitting binary data do the terminal. the reason for this
seems to be output_chars() called with negative len parameter.
(backtrace in this situation is appended to this mail)
The reason for this is that the commentary
/* Note obody[-1] is always 0. */
at line 960, File dispnew.c seems not to be true! It seems that in
some rare cases obody[-1]==' '. The consequences you can see from
reading the code following this line.
My quick and dirty fix (for i don't understand why obody[-1] should be
0 in all cases) follows:
*** dispnew.c~ Tue Jan 8 18:25:28 1991
--- dispnew.c Fri Mar 1 11:36:31 1991
***************
*** 862,869 ****
olen = current_screen->used[vpos];
if (! current_screen->highlight[vpos])
{
! /* Note obody[-1] is always 0. */
! if (!must_write_spaces)
while (obody[olen - 1] == ' ')
olen--;
}
--- 862,869 ----
olen = current_screen->used[vpos];
if (! current_screen->highlight[vpos])
{
! /* The following statement is wrong: Note obody[-1] is always 0. */
! if (!must_write_spaces && olen)
while (obody[olen - 1] == ' ')
olen--;
}
please let me hear your opinion
roland
(gdb) bt
#0 0x401e0 in kill ()
#1 0xc3e7 in fatal_error_signal (sig=11) (emacs.c line 149)
#2 0x401c8 in _sigreturn (4362972)
#3 0x3fafa in fwrite ()
#4 0xa37e in output_chars (string=(char *) 0x4458ab , len=-80) (term.c line 598)
#5 0x1af7 in update_line (vpos=9) (dispnew.c line 1063)
#6 0xfa0 in update_screen (force=0, inhibit_hairy_id=0) (dispnew.c line 699)
#7 0x36b7 in redisplay () (xdisp.c line 425)
#8 0x384b in redisplay_preserve_echo_area () (xdisp.c line 504)
#9 0x39021 in status_notify () (process.c line 2397)
#10 0x37f91 in wait_reading_process_input (time_limit=0, read_kbd=-1, do_display=1) (process.c line 1526)
#11 0xde0f in kbd_buffer_read_command_char () (keyboard.c line 1126)
#12 0xdad5 in read_command_char (commandflag=1) (keyboard.c line 970)
#13 0xe07c in read_key_sequence (keybuf=(char *) 0x7ffffc9c "\e>X", bufsize=30, prompt=(unsigned char *) 0x0, nodisplay=0) (keyboard.c line 1488)
#14 0xd3bb in command_loop_1 () (keyboard.c line 659)
#15 0x29fbb in internal_condition_case (bfun=(int (*)()) 0xd24c <command_loop_1>, handlers=21169404, hfun=(int (*)()) 0xce0c <cmd_error>) (eval.c line 1006)
#16 0xd106 in command_loop_2 () (keyboard.c line 530)
#17 0x29b55 in internal_catch (tag=21169384, func=(int (*)()) 0xd0ec <command_loop_2>, arg=21169164, 21169384, 53580, 21169164) (eval.c line 815)
#18 0xd0ca in command_loop () (keyboard.c line 512)
#19 0xcd98 in recursive_edit_1 () (keyboard.c line 397)
#20 0xcd2d in Frecursive_edit () (keyboard.c line 379)
#21 0xc80d in main (argc=1, argv=(char **) 0x7ffffdec, envp=(char **) 0x7ffffdf4) (emacs.c line 490)
Technical Details
Message-ID:
<9103011112.AA03597@kiss.informatik.tu-muenchen.de>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!unreplyable!garbageShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,c2aa7a5ff752f900,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1991-03-02 02:36:37 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!unreplyable!garbage From: bergler@informatik.tu-muenchen.dbp.de (Roland Bergler) Newsgroups: gnu.emacs.bug Subject: Bug in Emacs 18.57 dispnew.c Message-ID: <9103011112.AA03597@kiss.informatik.tu-muenchen.de> Date: 1 Mar 91 11:12:28 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 66 Approved: bug-gnu-emacs@prep.ai.mit.edu