From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Fabrice Bauzac Newsgroups: gmane.emacs.bugs Subject: Repeatable bug since src/process.c v1.403 Date: Sat, 17 May 2003 20:33:08 +0200 Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1053196359 6552 80.91.224.249 (17 May 2003 18:32:39 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 17 May 2003 18:32:39 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 17 20:32:36 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19H6U0-0001hM-00 for ; Sat, 17 May 2003 20:32:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19H6VT-0005Qx-04 for gnu-bug-gnu-emacs@m.gmane.org; Sat, 17 May 2003 14:34:07 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19H6VH-000535-00 for bug-gnu-emacs@gnu.org; Sat, 17 May 2003 14:33:55 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19H6V2-0004aW-00 for bug-gnu-emacs@gnu.org; Sat, 17 May 2003 14:33:40 -0400 Original-Received: from atoulouse-104-1-5-205.w80-14.abo.wanadoo.fr ([80.14.103.205] helo=noon.dnsalias.net) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19H6Uy-0003vZ-00 for bug-gnu-emacs@gnu.org; Sat, 17 May 2003 14:33:37 -0400 Original-Received: from noon by noon.dnsalias.net with local (Exim 3.36 #1 (Debian)) id 19H6UW-0004XW-00; Sat, 17 May 2003 20:33:08 +0200 Original-To: bug-gnu-emacs@gnu.org X-Face: 35Crq)9pDiw*lAy1W7\EiG+$]*.{@rz9?aI,}Tmv[Z0`i-#1J+|s?9iZzJ:UAw8YD'*NN6| g|,aH[dep+[!kd`Mk}9pyD5;@|8P:masw2S"///"A)XH X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:5097 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:5097 Hello, In GNU Emacs 21.3.2 (i386-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2003-04-24 on raven, modified by Debian configured using `configure i386-linux --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --with-x=yes --with-x-toolkit=athena --without-gif' Important settings: value of $LC_ALL: fr_FR value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: fr_FR locale-coding-system: iso-latin-1 default-enable-multibyte-characters: t Starting from Emacs CVS of 2003-03-09, I have this behavior: * Start Emacs; * Start a Eshell buffer; * Start mutt (Eshell starts term-mode for that); * Do many things from inside Mutt. At some point, Emacs crashes. This is what I get with 2003-05-17 CVS: ================================================================ bash-2.05b$ gdb ./emacs GNU gdb 5.3-debian Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-linux"...(no debugging symbols found)... DISPLAY = :0.0 TERM = dumb Breakpoint 1 at 0x8132c27 Breakpoint 2 at 0x810d51b (gdb) r Starting program: /home/noon/prog/cvs/build-emacs-20030517-bug/src/emacs -geometry 80x40+0+0 (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... Program received signal SIGSEGV, Segmentation fault. 0x08190a38 in compact_small_strings () (gdb) bt #0 0x08190a38 in compact_small_strings () #1 0x08190974 in sweep_strings () #2 0x0819480a in gc_sweep () #3 0x08193414 in Fgarbage_collect () #4 0x081ad816 in Ffuncall () #5 0x081e58f8 in Fbyte_code () #6 0x081ae20c in funcall_lambda () #7 0x081adc55 in Ffuncall () #8 0x081ad2e2 in Fapply () #9 0x081ad6a8 in apply1 () #10 0x081ee3da in read_process_output_call () #11 0x081ab9f1 in internal_condition_case_1 () #12 0x081ee8b5 in read_process_output () #13 0x081ee01a in wait_reading_process_input () #14 0x0808a43c in sit_for () #15 0x08138e2c in read_char () #16 0x0814225e in read_key_sequence () #17 0x0813613f in command_loop_1 () #18 0x081ab8c8 in internal_condition_case () #19 0x08135c72 in command_loop_2 () #20 0x081ab379 in internal_catch () #21 0x08135c25 in command_loop () #22 0x081356f2 in recursive_edit_1 () #23 0x08135821 in Frecursive_edit () #24 0x08134219 in main () #25 0x4059aa51 in __libc_start_main () from /lib/libc.so.6 (gdb) ================================================================ Since I don't know well how Emacs works, I managed to find (by dichotomy) at which date the CVS version began to crash this way with this reproductible bug. The bug seems to have appeared on 2003-03-09 with a modification on src/process.c: ================================================================ bash-2.05b$ cvs -qz3 diff -u -r1.402 -r1.403 process.c Index: process.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/process.c,v retrieving revision 1.402 retrieving revision 1.403 diff -u -r1.402 -r1.403 --- process.c 21 Feb 2003 18:13:53 -0000 1.402 +++ process.c 9 Mar 2003 22:48:08 -0000 1.403 @@ -4463,18 +4463,18 @@ if (DATAGRAM_CHAN_P (channel)) { int len = datagram_address[channel].len; - nbytes = recvfrom (channel, chars + carryover, readmax - carryover, + nbytes = recvfrom (channel, chars + carryover, readmax, 0, datagram_address[channel].sa, &len); } else #endif if (proc_buffered_char[channel] < 0) - nbytes = emacs_read (channel, chars + carryover, readmax - carryover); + nbytes = emacs_read (channel, chars + carryover, readmax); else { chars[carryover] = proc_buffered_char[channel]; proc_buffered_char[channel] = -1; - nbytes = emacs_read (channel, chars + carryover + 1, readmax - 1 - carryover); + nbytes = emacs_read (channel, chars + carryover + 1, readmax - 1); if (nbytes < 0) nbytes = 1; else ================================================================ I reverted this diff on my local copy of the latest Emacs CVS, and then tried to crash Emacs with the same test. It hasn't crashed yet, I am pretty sure the bug is not there anymore. I'm sure because when my test crashed Emacs, it always did so at a certain point (about 250 scrollups of mutt's cursor); and that point is largely past and Emacs hasn't crashed. I don't know at all what the carryover variable means, all I can do is patch and try. But if you need any help from me, please tell me what to do, patch or test. I'd be glad to help. Have a nice day, -- fabrice bauzac Software should be free. http://www.gnu.org/philosophy/why-free.html