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: Sat, 17 Apr 2010 10:55:50 +0300

> From: Juanma Barranquero <address@hidden>
> Date: Sat, 17 Apr 2010 01:18:16 +0200
> Cc: address@hidden, address@hidden
> 
> On Fri, Apr 16, 2010 at 23:06, Eli Zaretskii <address@hidden> wrote:
> 
> > What is ptr->xname in frame #2?
> 
> (gdb) frame 2
> #2  0x01049fed in mark_object (arg=49829890) at alloc.c:5576
> 5576            if (!PURE_POINTER_P (XSTRING (ptr->xname)))
> (gdb) p *ptr
> $1 = {
>   gcmarkbit = 1,
>   indirect_variable = 0,
>   constant = 0,
>   interned = 0,
>   xname = 0,
>   value = 0,
>   function = 0,
>   plist = 0,
>   next = 0x0
> }

So ptr->xname is NULL.  This is the same problem I see on my system.

> > Can you find out which char-table is being marked here?
> 
> How can I do that?

You go up the call stack printing the objects that are being marked,
until you find one that is a symbol with a meaningful name.  (Be
careful not to use `pp' or `pr', because in a crashed Emacs session
they can cause a SIGSEGV and mess up the GDB session.)

Here's what I did in this case:

  (gdb) bt 20
  #0  mark_object (arg=20065856) at alloc.c:5577
  #1  0x01068769 in mark_char_table (ptr=0x2fdbb00) at alloc.c:5396
  #2  0x010687a2 in mark_char_table (ptr=0x2fe2200) at alloc.c:5393
  #3  0x010687a2 in mark_char_table (ptr=0x2fe6000) at alloc.c:5393
  #4  0x01067e89 in mark_object (arg=20065856) at alloc.c:5685
  #5  0x01067f92 in mark_object (arg=20065856) at alloc.c:5572
  #6  0x010687e3 in mark_vectorlike (ptr=0x2be8000) at alloc.c:5368
  #7  0x01069517 in Fgarbage_collect () at alloc.c:5083
  #8  0x0100c37b in Ffuncall (nargs=2, args=0x82ef60) at eval.c:2958
  #9  0x0111f346 in Fbyte_code (bytestr=0, vector=8580960, maxdepth=1)
      at bytecode.c:680
  #10 0x0100bfc2 in funcall_lambda (fun=18630341, nargs=4, arg_vector=0x82f0d4)
      at eval.c:3211
  #11 0x0100c3a6 in Ffuncall (nargs=5, args=0x11c46c5) at eval.c:3081
  #12 0x0111f346 in Fbyte_code (bytestr=0, vector=8581328, maxdepth=4)
      at bytecode.c:680
  #13 0x0100bfc2 in funcall_lambda (fun=18640949, nargs=2, arg_vector=0x82f244)
      at eval.c:3211
  #14 0x0100c3a6 in Ffuncall (nargs=3, args=0x11c7035) at eval.c:3081
  #15 0x0111f346 in Fbyte_code (bytestr=0, vector=8581696, maxdepth=2)
      at bytecode.c:680
  #16 0x0100bfc2 in funcall_lambda (fun=18641317, nargs=2, arg_vector=0x82f3b4)
      at eval.c:3211
  #17 0x0100c3a6 in Ffuncall (nargs=3, args=0x11c71a5) at eval.c:3081
  #18 0x0111f346 in Fbyte_code (bytestr=0, vector=8582064, maxdepth=2)
      at bytecode.c:680
  #19 0x0100bb95 in Feval (form=20091344) at eval.c:2352
  (More stack frames follow...)

  Lisp Backtrace:
  "set-face-attribute" (0x82f0d4)
  "face-spec-reset-face" (0x82f244)
  "face-spec-recalc" (0x82f3b4)
  "byte-code" (0x82f490)
  "face-set-after-frame-default" (0x82f754)
  "frame-notice-user-settings" (0x82f8d4)
  "byte-code" (0x82f9c0)
  "normal-top-level" (0x82fc00)
  (gdb) frame 4
  #4  0x01067e89 in mark_object (arg=20065856) at alloc.c:5685
  5685            mark_object (ptr->car);
  (gdb) p *ptr
  $7 = {
    car = 50225157,
    u = {
      cdr = 47281638,
      chain = 0x2d175e6
    }
  }
  (gdb) p ptr->car
  $8 = 50225157
  (gdb) xtype
  Lisp_Vectorlike
  PVEC_CHAR_TABLE
  (gdb) xchartable
  $9 = (struct Lisp_Char_Table *) 0x2fe6000
  Purpose: "keymap"  0 extra slots              <<<<<<<<<<<<<<<<<<<
  (gdb) up
  #5  0x01067f92 in mark_object (arg=20065856) at alloc.c:5572
  5572            mark_object (ptr->value);
  (gdb) p *ptr
  $10 = {
    gcmarkbit = 1,
    indirect_variable = 0,
    constant = 0,
    interned = 2,
    xname = 19319113,
    value = 47281342,
    function = 46037018,
    plist = 47277422,
    next = 0x2f67ad0
  }
  (gdb) p ptr->xname
  $11 = 19319113
  (gdb) xtype
  Lisp_String
  (gdb) xstring
  $12 = (struct Lisp_String *) 0x126c948
  "Buffer-menu-mode-map"        <<<<<<<<<<<<<<<<<<<<<<<<<<

The two lines marked with "<<<<<<<<<<<<<<" tell me that the char-table
belongs to Buffer-menu-mode-map which is a keymap.




reply via email to

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