[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs from cvs on GNU dumps core when opening any kind of c file

From: Jan D.
Subject: Re: emacs from cvs on GNU dumps core when opening any kind of c file
Date: Fri, 20 Aug 2004 10:51:07 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040810

Han Boetes wrote:
Han Boetes wrote:

This crash happens on both GNU and OpenBSD.

I actually found out that one specific line in my .emacs causes this crash.

mv .emacs .emacs_bak
echo '(standard-display-european t)' > .emacs
emacs some/c/file.c

and there is the core-dump.
This happens since the beginning of august.

The buffer contents is "foo123", ZV is 7, BEGV is 1. Crach happens here in intervals.c, charpos is 8:

2032      /* Check this now, before checking if the buffer has any intervals.
2033         That way, we can catch conditions which break this sanity check
2034         whether or not there are intervals in the buffer.  */
2035      if (charpos > BUF_ZV (buffer) || charpos < BUF_BEGV (buffer))
2036        abort ();

I think there is a bug in skip_chars in syntax.c.  In the last while (1) loop,
we are skipping backwards, but the code says:

              while (1)
                  if (p <= stop)
                      if (p <= endp)
                      p = GPT_ADDR;
                      stop = endp;

                  if (! NILP (iso_classes) && in_classes (p[-1], iso_classes))
                      if (negate)
                        goto fwd_ok;

                  if (!fastmap[p[-1]])

                  p--, pos--;

thus increasing pos beyond the end of the buffer.
Just changing this to goto back_ok does not fix it, because then the loop is exited only when pos is 0, i.e. before the start of the buffer, and the same abort happens.

Hopefully someone with more knowledge of this code knows whats wrong.

        Jan D.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]