emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: SIGSEGV in garbage collection


From: Reiner Steib
Subject: Re: SIGSEGV in garbage collection
Date: Thu, 20 Feb 2003 21:18:09 +0100
User-agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2.95

On Thu, Feb 20 2003, Reiner Steib wrote:

> On Thu, Feb 20 2003, Richard Stallman wrote:
>
>>     | (gdb) bt
>>     | #0  0x8116dae in mem_delete_fixup (x=0x826bc80) at alloc.c:3043
>>     | #1  0x8116d40 in mem_delete (z=0x9247ad8) at alloc.c:3012
>>     | #2  0x8114e8b in lisp_free (block=0x9247ab0) at alloc.c:632
>>
>> The first question is, what's going on in those frames?
>> Can you find the invalid data and see what is invalid about it?
>
> I have no idea how to find the invalid data.

Somebody told me per PM, that it might be useful to send the
information below as a starting point.  (I can continue to do "info
locals, x, p" on the other frames a well, if I should.)

Bye, Reiner.

--8<---------------cut here---------------start------------->8---
(gdb) bt
#0  0x8116dae in mem_delete_fixup (x=0x826bc80) at alloc.c:3043
#1  0x8116d40 in mem_delete (z=0x9247ad8) at alloc.c:3012
#2  0x8114e8b in lisp_free (block=0x9247ab0) at alloc.c:632
#3  0x81191b4 in gc_sweep () at alloc.c:5270
#4  0x8117e87 in Fgarbage_collect () at alloc.c:4194
#5  0x80d64b9 in read_char (commandflag=1, nmaps=3, maps=0xbfffdec4, 
    prev_event=405245404, used_mouse_menu=0xbfffdf0c) at keyboard.c:2514
#6  0x80dcc22 in read_key_sequence (keybuf=0xbfffe014, bufsize=30, 
    prompt=405245404, dont_downcase_last=0, can_return_switch_frame=1, 
    fix_current_buffer=1) at keyboard.c:8191
#7  0x80d4aa4 in command_loop_1 () at keyboard.c:1440
#8  0x8128927 in internal_condition_case (bfun=0x80d47b0 <command_loop_1>, 
    handlers=405341748, hfun=0x80d43c0 <cmd_error>) at eval.c:1267
#9  0x80d466e in command_loop_2 () at keyboard.c:1245
#10 0x812849f in internal_catch (tag=405303332, 
    func=0x80d4650 <command_loop_2>, arg=405245404) at eval.c:1030
#11 0x80d4613 in command_loop () at keyboard.c:1224
#12 0x80d412d in recursive_edit_1 () at keyboard.c:950
#13 0x80d4271 in Frecursive_edit () at keyboard.c:1006
#14 0x80d3071 in main (argc=6, argv=0xbfffe5d4, envp=0xbfffe5f0)
    at emacs.c:1547
#15 0x4032ebaf in __libc_start_main () from /lib/libc.so.6
(gdb) info frame
Stack level 0, frame at 0xbfffdb6c:
 eip = 0x8116dae in mem_delete_fixup (alloc.c:3043); saved eip 0x8116d40
 called by frame at 0xbfffdb9c
 source language c.
 Arglist at 0xbfffdb6c, args: x=0x826bc80
 Locals at 0xbfffdb6c, Previous frame's sp is 0x0
 Saved registers:
  ebx at 0xbfffdb54, ebp at 0xbfffdb6c, eip at 0xbfffdb70
(gdb) info locals
w = (struct mem_node *) 0x9247b98
x = (struct mem_node *) 0x826bc80
(gdb) x w
0x9247b98:      0x00000000
(gdb) p w
$1 = (struct mem_node *) 0x9247b98
(gdb) info locals
z = (struct mem_node *) 0x0
x = (struct mem_node *) 0x9247b98
y = (struct mem_node *) 0x9247ad8
(gdb) x z    
0x0:    Cannot access memory at address 0x0
(gdb) x x
0x9247b98:      0x00000000
(gdb) x y
0x9247ad8:      0x0826bc80
(gdb) p z
$2 = (struct mem_node *) 0x0
(gdb) p x
$3 = (struct mem_node *) 0x9247b98
(gdb) p y
$4 = (struct mem_node *) 0x9247ad8
(gdb) up
#2  0x8114e8b in lisp_free (block=0x9247ab0) at alloc.c:632
632       mem_delete (mem_find (block));
(gdb) info locals
block = (void *) 0x9247ab0
(gdb) x block
0x9247ab0:      0x09891060
(gdb) p block
$5 = (void *) 0x9247ab0
(gdb) up
#3  0x81191b4 in gc_sweep () at alloc.c:5270
5270              lisp_free (vector);
(gdb) info locals
vector = (struct Lisp_Vector *) 0x0
prev = (struct Lisp_Vector *) 0x91ebc48
next = (struct Lisp_Vector *) 0x927cfd8
(gdb) x vector
0x0:    Cannot access memory at address 0x0
(gdb) p vector
$6 = (struct Lisp_Vector *) 0x0
(gdb) x prev
0x91ebc48:      0x20008187
(gdb) p prev
$7 = (struct Lisp_Vector *) 0x91ebc48
(gdb) x next
0x927cfd8:      0x00000006
(gdb) p next
$8 = (struct Lisp_Vector *) 0x927cfd8

(gdb) up
#4  0x8117e87 in Fgarbage_collect () at alloc.c:4194
4194      gc_sweep ();
(gdb) info locals
bind = (struct specbinding *) 0x18278ddc
catch = (struct catchtag *) 0x18278ddc
handler = (struct handler *) 0x18278ddc
backlist = (struct backtrace *) 0x95ce5c4
stack_top_variable = 8 '\b'
i = 405245404
message_p = 1
total = {-1073750388, 135095444, 0, 0, -1073750388, 135095434, 405245404, 
  405245404}
count = 2
(gdb) x bind
0x18278ddc:     Cannot access memory at address 0x18278ddc
(gdb) p bind
$9 = (struct specbinding *) 0x18278ddc
(gdb) x catch
0x18278ddc:     Cannot access memory at address 0x18278ddc
(gdb) p catch
$10 = (struct catchtag *) 0x18278ddc
(gdb) x handler
0x18278ddc:     Cannot access memory at address 0x18278ddc
(gdb) p handler
$11 = (struct handler *) 0x18278ddc
(gdb) x backlist
0x95ce5c4:      0x595ce5bc
(gdb) p backlist
$12 = (struct backtrace *) 0x95ce5c4
(gdb) x stack_top_variable
0x8:    Cannot access memory at address 0x8
(gdb) p stack_top_variable
$13 = 8 '\b'

(gdb) frame 1
#1  0x8116d40 in mem_delete (z=0x9247ad8) at alloc.c:3012
3012        mem_delete_fixup (x);
(gdb) info frame
Stack level 1, frame at 0xbfffdb9c:
 eip = 0x8116d40 in mem_delete (alloc.c:3012); saved eip 0x8114e8b
 called by frame at 0xbfffdbec, caller of frame at 0xbfffdb6c
 source language c.
 Arglist at 0xbfffdb9c, args: z=0x9247ad8
 Locals at 0xbfffdb9c, Previous frame's sp is 0x0
 Saved registers:
  ebx at 0xbfffdb84, ebp at 0xbfffdb9c, eip at 0xbfffdba0
(gdb) frame 2
#2  0x8114e8b in lisp_free (block=0x9247ab0) at alloc.c:632
632       mem_delete (mem_find (block));
(gdb) info frame
Stack level 2, frame at 0xbfffdbec:
 eip = 0x8114e8b in lisp_free (alloc.c:632); saved eip 0x81191b4
 called by frame at 0xbfffdc6c, caller of frame at 0xbfffdb9c
 source language c.
 Arglist at 0xbfffdbec, args: block=0x9247ab0
 Locals at 0xbfffdbec, Previous frame's sp is 0x0
 Saved registers:
  ebx at 0xbfffdbd4, ebp at 0xbfffdbec, eip at 0xbfffdbf0
(gdb) frame 3
#3  0x81191b4 in gc_sweep () at alloc.c:5270
5270              lisp_free (vector);
(gdb) info frame
Stack level 3, frame at 0xbfffdc6c:
 eip = 0x81191b4 in gc_sweep (alloc.c:5270); saved eip 0x8117e87
 called by frame at 0xbfffdccc, caller of frame at 0xbfffdbec
 source language c.
 Arglist at 0xbfffdc6c, args: 
 Locals at 0xbfffdc6c, Previous frame's sp is 0x0
 Saved registers:
  ebx at 0xbfffdc04, ebp at 0xbfffdc6c, esi at 0xbfffdc08, edi at 0xbfffdc0c,
  eip at 0xbfffdc70
(gdb) frame 4
#4  0x8117e87 in Fgarbage_collect () at alloc.c:4194
4194      gc_sweep ();
(gdb) info frame
Stack level 4, frame at 0xbfffdccc:
 eip = 0x8117e87 in Fgarbage_collect (alloc.c:4194); saved eip 0x80d64b9
 called by frame at 0xbfffde8c, caller of frame at 0xbfffdc6c
 source language c.
 Arglist at 0xbfffdccc, args: 
 Locals at 0xbfffdccc, Previous frame's sp is 0x0
 Saved registers:
  ebx at 0xbfffdc74, ebp at 0xbfffdccc, esi at 0xbfffdc78, edi at 0xbfffdc7c,
  eip at 0xbfffdcd0
(gdb) frame 5
#5  0x80d64b9 in read_char (commandflag=1, nmaps=3, maps=0xbfffdec4, 
    prev_event=405245404, used_mouse_menu=0xbfffdf0c) at keyboard.c:2514
2514                    Fgarbage_collect ();
(gdb) info frame
Stack level 5, frame at 0xbfffde8c:
 eip = 0x80d64b9 in read_char (keyboard.c:2514); saved eip 0x80dcc22
 called by frame at 0xbfffdfbc, caller of frame at 0xbfffdccc
 source language c.
 Arglist at 0xbfffde8c, args: commandflag=1, nmaps=3, maps=0xbfffdec4, 
    prev_event=405245404, used_mouse_menu=0xbfffdf0c
 Locals at 0xbfffde8c, Previous frame's sp is 0x0
 Saved registers:
  ebx at 0xbfffdcd4, ebp at 0xbfffde8c, esi at 0xbfffdcd8, edi at 0xbfffdcdc,
  eip at 0xbfffde90
(gdb) frame 5
#5  0x80d64b9 in read_char (commandflag=1, nmaps=3, maps=0xbfffdec4, 
    prev_event=405245404, used_mouse_menu=0xbfffdf0c) at keyboard.c:2514
2514                    Fgarbage_collect ();
(gdb) frame 5
#5  0x80d64b9 in read_char (commandflag=1, nmaps=3, maps=0xbfffdec4, 
    prev_event=405245404, used_mouse_menu=0xbfffdf0c) at keyboard.c:2514
2514                    Fgarbage_collect ();
(gdb) frame 6
#6  0x80dcc22 in read_key_sequence (keybuf=0xbfffe014, bufsize=30, 
    prompt=405245404, dont_downcase_last=0, can_return_switch_frame=1, 
    fix_current_buffer=1) at keyboard.c:8191
8191                key = read_char (NILP (prompt), nmaps,
(gdb) info frame
Stack level 6, frame at 0xbfffdfbc:
 eip = 0x80dcc22 in read_key_sequence (keyboard.c:8191); saved eip 0x80d4aa4
 called by frame at 0xbfffe08c, caller of frame at 0xbfffde8c
 source language c.
 Arglist at 0xbfffdfbc, args: keybuf=0xbfffe014, bufsize=30, prompt=405245404, 
    dont_downcase_last=0, can_return_switch_frame=1, fix_current_buffer=1
 Locals at 0xbfffdfbc, Previous frame's sp is 0x0
 Saved registers:
  ebx at 0xbfffded4, ebp at 0xbfffdfbc, esi at 0xbfffded8, edi at 0xbfffdedc,
  eip at 0xbfffdfc0
(gdb) frame 7
#7  0x80d4aa4 in command_loop_1 () at keyboard.c:1440
1440          i = read_key_sequence (keybuf, sizeof keybuf / sizeof keybuf[0],
(gdb) info frame
Stack level 7, frame at 0xbfffe08c:
 eip = 0x80d4aa4 in command_loop_1 (keyboard.c:1440); saved eip 0x8128927
 called by frame at 0xbfffe17c, caller of frame at 0xbfffdfbc
 source language c.
 Arglist at 0xbfffe08c, args: 
 Locals at 0xbfffe08c, Previous frame's sp is 0x0
 Saved registers:
  ebx at 0xbfffdfe4, ebp at 0xbfffe08c, esi at 0xbfffdfe8, edi at 0xbfffdfec,
  eip at 0xbfffe090
(gdb) frame 8
#8  0x8128927 in internal_condition_case (bfun=0x80d47b0 <command_loop_1>, 
    handlers=405341748, hfun=0x80d43c0 <cmd_error>) at eval.c:1267
1267      val = (*bfun) ();
(gdb) info frame
Stack level 8, frame at 0xbfffe17c:
 eip = 0x8128927 in internal_condition_case (eval.c:1267); saved eip 0x80d466e
 called by frame at 0xbfffe19c, caller of frame at 0xbfffe08c
 source language c.
 Arglist at 0xbfffe17c, args: bfun=0x80d47b0 <command_loop_1>, 
    handlers=405341748, hfun=0x80d43c0 <cmd_error>
 Locals at 0xbfffe17c, Previous frame's sp is 0x0
 Saved registers:
  ebp at 0xbfffe17c, eip at 0xbfffe180
(gdb) frame 9
#9  0x80d466e in command_loop_2 () at keyboard.c:1245
1245        val = internal_condition_case (command_loop_1, Qerror, cmd_error);
(gdb) info frame
Stack level 9, frame at 0xbfffe19c:
 eip = 0x80d466e in command_loop_2 (keyboard.c:1245); saved eip 0x812849f
 called by frame at 0xbfffe28c, caller of frame at 0xbfffe17c
 source language c.
 Arglist at 0xbfffe19c, args: 
 Locals at 0xbfffe19c, Previous frame's sp is 0x0
 Saved registers:
  ebp at 0xbfffe19c, eip at 0xbfffe1a0
(gdb) frame 10
#10 0x812849f in internal_catch (tag=405303332, 
    func=0x80d4650 <command_loop_2>, arg=405245404) at eval.c:1030
1030        c.val = (*func) (arg);
(gdb) info frame
Stack level 10, frame at 0xbfffe28c:
 eip = 0x812849f in internal_catch (eval.c:1030); saved eip 0x80d4613
 called by frame at 0xbfffe2bc, caller of frame at 0xbfffe19c
 source language c.
 Arglist at 0xbfffe28c, args: tag=405303332, func=0x80d4650 <command_loop_2>, 
    arg=405245404
 Locals at 0xbfffe28c, Previous frame's sp is 0x0
 Saved registers:
  ebp at 0xbfffe28c, eip at 0xbfffe290
(gdb) frame 11
#11 0x80d4613 in command_loop () at keyboard.c:1224
1224            internal_catch (Qtop_level, command_loop_2, Qnil);
(gdb) info frame
Stack level 11, frame at 0xbfffe2bc:
 eip = 0x80d4613 in command_loop (keyboard.c:1224); saved eip 0x80d412d
 called by frame at 0xbfffe2ec, caller of frame at 0xbfffe28c
 source language c.
 Arglist at 0xbfffe2bc, args: 
 Locals at 0xbfffe2bc, Previous frame's sp is 0x0
 Saved registers:
  ebp at 0xbfffe2bc, eip at 0xbfffe2c0
(gdb) frame 12
#12 0x80d412d in recursive_edit_1 () at keyboard.c:950
950       val = command_loop ();
(gdb) info frame
Stack level 12, frame at 0xbfffe2ec:
 eip = 0x80d412d in recursive_edit_1 (keyboard.c:950); saved eip 0x80d4271
 called by frame at 0xbfffe30c, caller of frame at 0xbfffe2bc
 source language c.
 Arglist at 0xbfffe2ec, args: 
 Locals at 0xbfffe2ec, Previous frame's sp is 0x0
 Saved registers:
  ebx at 0xbfffe2d4, ebp at 0xbfffe2ec, esi at 0xbfffe2d8, eip at 0xbfffe2f0
(gdb) frame 13
#13 0x80d4271 in Frecursive_edit () at keyboard.c:1006
1006      recursive_edit_1 ();
(gdb) info frame
Stack level 13, frame at 0xbfffe30c:
 eip = 0x80d4271 in Frecursive_edit (keyboard.c:1006); saved eip 0x80d3071
 called by frame at 0xbfffe56c, caller of frame at 0xbfffe2ec
 source language c.
 Arglist at 0xbfffe30c, args: 
 Locals at 0xbfffe30c, Previous frame's sp is 0x0
 Saved registers:
  ebx at 0xbfffe2f4, ebp at 0xbfffe30c, eip at 0xbfffe310
(gdb) frame 14
#14 0x80d3071 in main (argc=6, argv=0xbfffe5d4, envp=0xbfffe5f0)
    at emacs.c:1547
1547      Frecursive_edit ();
(gdb) info frame
Stack level 14, frame at 0xbfffe56c:
 eip = 0x80d3071 in main (emacs.c:1547); saved eip 0x4032ebaf
 called by frame at 0xbfffe5a8, caller of frame at 0xbfffe30c
 source language c.
 Arglist at 0xbfffe56c, args: argc=6, argv=0xbfffe5d4, envp=0xbfffe5f0
 Locals at 0xbfffe56c, Previous frame's sp is 0x0
 Saved registers:
  ebp at 0xbfffe56c, eip at 0xbfffe570
(gdb) frame 15
#15 0x4032ebaf in __libc_start_main () from /lib/libc.so.6
(gdb) info frame
Stack level 15, frame at 0xbfffe5a8:
 eip = 0x4032ebaf in __libc_start_main; saved eip 0x804f291
 caller of frame at 0xbfffe56c
 Arglist at 0xbfffe5a8, args: 
 Locals at 0xbfffe5a8, Previous frame's sp is 0x0
 Saved registers:
  ebx at 0xbfffe590, ebp at 0xbfffe5a8, esi at 0xbfffe594, edi at 0xbfffe598,
  eip at 0xbfffe5ac
--8<---------------cut here---------------end--------------->8---




reply via email to

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