From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#15282: 24.3.50; Starting a new emacsclient -t instance with another instance running in a separate terminal causes display corruption in the first instance. Date: Fri, 06 Sep 2013 13:16:09 +0300 Message-ID: <83d2ommf12.fsf@gnu.org> References: <20130906014614.GA15534@thinkpwn> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1378462637 2875 80.91.229.3 (6 Sep 2013 10:17:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Sep 2013 10:17:17 +0000 (UTC) Cc: 15282@debbugs.gnu.org To: Chow Loong Jin , Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 06 12:17:19 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VHt6N-0006qL-3m for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Sep 2013 12:17:19 +0200 Original-Received: from localhost ([::1]:36417 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHt6M-0004YL-Ma for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Sep 2013 06:17:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHt6D-0004Xi-MI for bug-gnu-emacs@gnu.org; Fri, 06 Sep 2013 06:17:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHt66-0002j1-LV for bug-gnu-emacs@gnu.org; Fri, 06 Sep 2013 06:17:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34909) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHt66-0002iw-I0 for bug-gnu-emacs@gnu.org; Fri, 06 Sep 2013 06:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VHt65-00089p-Pp for bug-gnu-emacs@gnu.org; Fri, 06 Sep 2013 06:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Sep 2013 10:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15282 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15282-submit@debbugs.gnu.org id=B15282.137846258931313 (code B ref 15282); Fri, 06 Sep 2013 10:17:01 +0000 Original-Received: (at 15282) by debbugs.gnu.org; 6 Sep 2013 10:16:29 +0000 Original-Received: from localhost ([127.0.0.1]:43201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VHt5Y-00088u-6b for submit@debbugs.gnu.org; Fri, 06 Sep 2013 06:16:28 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:54035) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VHt5U-00088d-UY for 15282@debbugs.gnu.org; Fri, 06 Sep 2013 06:16:26 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MSP00B008ECBJ00@a-mtaout22.012.net.il> for 15282@debbugs.gnu.org; Fri, 06 Sep 2013 13:16:18 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MSP00BQ08J69R30@a-mtaout22.012.net.il>; Fri, 06 Sep 2013 13:16:18 +0300 (IDT) In-reply-to: <20130906014614.GA15534@thinkpwn> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:78044 Archived-At: > Date: Fri, 6 Sep 2013 09:46:17 +0800 > From: Chow Loong Jin > > 1. Start the daemon: emacs -Q --daemon > 2. Start emacsclient: emacsclient -t > 3. Open a new terminal, and start another emacsclient instance: > emacsclient -t > 4. Go back to the first emacsclient instance, and notice that there's > some text corruption that can't be cleared without closing that > emacsclient instance. ^Z followed by fg doesn't get rid of the issue > either. The reason seems to be this commit: revno: 114012 author: Paul Eggert committer: Paul Eggert branch nick: trunk timestamp: Mon 2013-08-26 18:10:30 +0000 message: Fix unlikely core dump in init_tty, and simplify terminfo case. * term.c (init_tty) [TERMINFO]: Fix check for buffer overrun. The old version incorrectly dumped core if malloc returned a buffer containing only non-NUL bytes. (init_tty): Do not allocate or free termcap buffers; the struct does that for us now. * termchar.h (TERMCAP_BUFFER_SIZE) [!TERMINFO]: New constant. (struct tty_display_info): Define members termcap_term_buffer and termcap_strings_buffer only if !TERMINFO, since terminfo doesn't use them. Allocate them directly in struct rather than indirectly via a pointer, to simplify init_tty. Paul, could you take a look, please?