From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Ok, somebody give me a clue. Date: Mon, 28 Feb 2005 16:55:32 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1109606745 23893 80.91.229.2 (28 Feb 2005 16:05:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 Feb 2005 16:05:45 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 28 17:05:45 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D5nOS-0004rK-Tn for ged-emacs-devel@m.gmane.org; Mon, 28 Feb 2005 17:05:13 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D5ngq-0003wO-I7 for ged-emacs-devel@m.gmane.org; Mon, 28 Feb 2005 11:24:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D5nc9-0000ql-UQ for emacs-devel@gnu.org; Mon, 28 Feb 2005 11:19:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D5nbu-0000iV-C6 for emacs-devel@gnu.org; Mon, 28 Feb 2005 11:19:06 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D5nbt-0000dt-Ix for emacs-devel@gnu.org; Mon, 28 Feb 2005 11:19:05 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D5nF8-0008Dd-VF for emacs-devel@gnu.org; Mon, 28 Feb 2005 10:55:35 -0500 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1D5nF7-0007Ab-UO; Mon, 28 Feb 2005 10:55:34 -0500 Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: (Kim F. Storm's message of "Mon, 28 Feb 2005 15:06:04 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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 X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: main.gmane.org gmane.emacs.devel:33931 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:33931 storm@cua.dk (Kim F. Storm) writes: > David Kastrup writes: > >> For debugging purposes, I have been using the following: >> >> struct trbuf { void* pc; int value; } trbuf[256]; >> unsigned char trptr; >> #define RECORD_INPUT do { __label__ woozle; \ >> woozle: trbuf[trptr++] = (struct trbuf) \ > > Does [trptr++%256] give better results ? No, I already did that. I also increased the amount of pure storage size since obviously that macro gets compiled in a lot. No go. I had a version temporarily where I initialized the data, causing it to end up in the .data segment, seemingly a nono. But I have checked that it is now correctly in .bss. I also tried replacing the code by something without the constructor-style task. No luck. >> And then whereever I change interrupt_input_blocked, I also call >> RECORD_INPUT. This causes Emacs to crash in unrelated spaces. I >> have crosschecked the compiled code, and it does the correct thing: >> no data type overflow problems or something. Bah. I have now tracked this down. The following causes crashes already with SIGSEGV at some unrelated place. #define RECORD_INPUT do { __label__ woozle; woozle: ; } while (0) If I instead use #define RECORD_INPUT do { ; } while (0) it works. So either gcc is broken with regard to local labels, or it produces something from them which confuses the dumper. Does anybody have a good clue whether this is just to be considered an Emacs internal problem? I'll probably get at the current address by some other means as well, but it might be something which one ought to report, unless it is just our dumper. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum