unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Ok, somebody give me a clue.
Date: Mon, 28 Feb 2005 16:55:32 +0100	[thread overview]
Message-ID: <x5psykfzm3.fsf@lola.goethe.zz> (raw)
In-Reply-To: <m37jks93ub.fsf@kfs-l.imdomain.dk> (Kim F. Storm's message of "Mon, 28 Feb 2005 15:06:04 +0100")

storm@cua.dk (Kim F. Storm) writes:

> David Kastrup <dak@gnu.org> 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

  parent reply	other threads:[~2005-02-28 15:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-28 12:02 Ok, somebody give me a clue David Kastrup
2005-02-28 14:06 ` Kim F. Storm
2005-02-28 14:48   ` Andreas Schwab
2005-02-28 16:20     ` David Kastrup
2005-02-28 15:55   ` David Kastrup [this message]
2005-03-02 11:23     ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=x5psykfzm3.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).