From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: [philippe.waroquiers@eurocontrol.int: RE: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set] Date: Thu, 09 Aug 2007 19:11:29 -0400 Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1186701036 19639 80.91.229.12 (9 Aug 2007 23:10:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 9 Aug 2007 23:10:36 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 10 01:10:32 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IJH97-00076V-3J for ged-emacs-devel@m.gmane.org; Fri, 10 Aug 2007 01:10:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IJH96-0008Ge-Im for ged-emacs-devel@m.gmane.org; Thu, 09 Aug 2007 19:10:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IJH7C-0007Dq-5H for emacs-devel@gnu.org; Thu, 09 Aug 2007 19:08:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IJH7B-0007Ch-MV for emacs-devel@gnu.org; Thu, 09 Aug 2007 19:08:25 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IJH7B-0007CZ-7k for emacs-devel@gnu.org; Thu, 09 Aug 2007 19:08:25 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IJH7A-0005R3-RR for emacs-devel@gnu.org; Thu, 09 Aug 2007 19:08:24 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1IJHA9-0006Z2-LI; Thu, 09 Aug 2007 19:11:29 -0400 X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:76290 Archived-At: Would someone please check and install this fix? It is not presented very clearly, and you need to write the change log, but I think that is better than trying to pressure him to do it. Please install the fix in Eacs 22. Please ack when it is done. ------- Start of forwarded message ------- X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed version=3.1.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: RE: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set Date: Thu, 9 Aug 2007 09:39:08 +0200 In-Reply-To: Thread-Topic: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set Thread-Index: AcfaRSWSpQ2knbdCQFGAAyYBXoXcGwAEbgyA From: "WAROQUIERS Philippe" To: Cc: >Please try to debug it and find the cause. >First I suggest recompiling using -g. >That means the .gdbinit file wasn't found or didn't work. >Please try to figure out why. .gdbinit was not found because I was not in the good directory. After recompiling with debug and using gdb, I was able to see what is happening, and tested a fix. The problem is that when emacs starts up without DISPLAY, it calls the function tty_default_color_capabilities. For a reason not clear to me (my knowledge of C is *very* rusty), the static local variables in tty_default_color_capabilities are not properly initialized to NULL or 0 at startup. I first tried to just put a " = NULL;" and a "= 0;" but that did not solve the problem. At the end, the problem was solved by moving the static variables just before the function tty_default_color_capabilities (and also initializing them to NULL/0). In other words, the below fixes the problem: /* Save or restore the default color-related capabilities of this terminal. */ static char *default_orig_pair, *default_set_foreground, *default_set_background = NULL; /* need init ??? */ static int default_max_colors, default_max_pairs, default_no_color_video = 0; /* need init ??? */ static void tty_default_color_capabilities (save) int save; { if (save) { if (default_orig_pair) As I do not understand too much the problem, if you need any other investigation, I can always see what I can do. Thanks for your help ... ____ This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful. Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy. Any views expressed in this message are those of the sender. ------- End of forwarded message -------