emacs-devel
[Top][All Lists]
Advanced

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

Re: emacs from head segfaults when run with -nw


From: Eli Zaretskii
Subject: Re: emacs from head segfaults when run with -nw
Date: Mon, 19 Apr 2010 15:31:57 +0300

> From: Sascha Wilde <address@hidden>
> Date: Sat, 17 Apr 2010 20:49:20 +0200
> Cc: address@hidden, address@hidden
> 
> Eli Zaretskii <address@hidden> wrote:
> >> From: Sascha Wilde <address@hidden>
> [...]
> > Thanks.  Can you show more of the backtrace?  I'd like to see if we
> > are marking a char-table here.
> >
> >> If it helps I can make an unoptimized build and send more complete
> >> debugging output...
> >
> > It would certainly help, if the unoptimized build crashes as well.
> 
> Took me some time to get the segfault, but finally I succeeded...  :-) 
> Ok, here we go:
> 
> Program received signal SIGSEGV, Segmentation fault.
> mark_object (arg=17) at 
> /home/wilde/src/stdsrc/emacs/emacs-wilde.hg/src/alloc.c:5464
> 5464          if (STRING_MARKED_P (ptr))
> (gdb) bt
> #0  mark_object (arg=17) at 
> /home/wilde/src/stdsrc/emacs/emacs-wilde.hg/src/alloc.c:5464
> #1  0x081c4da8 in mark_object (arg=139549338) at 
> /home/wilde/src/stdsrc/emacs/emacs-wilde.hg/src/alloc.c:5572

I think I finally nailed it.  Thanks to all who offered ideas and
backtraces, and suffered silently while I was looking for the reason.

And yes, it was my fault :-(

Please try again and see if the crashes are gone now.  They are for
me, on MS-Windows.

For the record, here's how I found the culprit:

  . Start a new Emacs session under GDB with "start -Q -nw".

  . When it stopped at the beginning of `main', compare the contents
    of the corrupted entry in the offending char-table between the
    crashed and the new sessions.  Notice that the value in the new
    session was correct (nil).  (As I reported earlier, the value at
    the same address in the crashed session was like nil, but with one
    extra bit set.)

  . Put a hardware watchpoint on the value that was corrupted in the
    crashed session, and run the newly started session.  When the
    watchpoint was triggered, GDB had my bug staring at me.  The rest,
    as they say, is in the history DAG ;-)




reply via email to

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