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

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

Re: GC bug


From: Alex Schroeder
Subject: Re: GC bug
Date: Wed, 18 Jun 2003 22:29:14 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

This is my "pasting from Emacs to Mozilla Firebird garbage collection
bug" again.  I've collected the debugging procedure from your two
previous mails, replacing the old addresses with the addresses from
the new bt.

Here is the bt:

#0  0x40248a51 in kill () from /lib/libc.so.6
#1  0x080d5b1a in abort () at emacs.c:417
#2  0x0811d245 in mark_object (argptr=0xbfffd844) at alloc.c:4862
#3  0x0811bc1d in mark_memory (start=0xbfffd87c, end=0xbffff9e4) at alloc.c:3453
#4  0x0811c082 in mark_stack () at alloc.c:3835
#5  0x0811c655 in Fgarbage_collect () at alloc.c:4207
#6  0x08156b55 in Fbyte_code (bytestr=941903736, vector=1210339352, maxdepth=7) 
at bytecode.c:745
#7  0x0812fc61 in funcall_lambda (fun=1210339160, nargs=1, 
arg_vector=0xbfffdab4) at eval.c:2911
#8  0x0812f821 in Ffuncall (nargs=2, args=0xbfffdab0) at eval.c:2781
#9  0x08156abc in Fbyte_code (bytestr=941904864, vector=1210340648, 
maxdepth=10) at bytecode.c:710
#10 0x0812fc61 in funcall_lambda (fun=1210340280, nargs=0, 
arg_vector=0xbfffdc48) at eval.c:2911
#11 0x0812f821 in Ffuncall (nargs=1, args=0xbfffdc44) at eval.c:2781
#12 0x0812f2ff in run_hook_with_args (nargs=1, args=0xbfffdc44, 
cond=to_completion) at eval.c:2394
...

> #3  0x0811bc1d in mark_memory (start=0xbfffd87c, end=0xbffff9e4) at 
> alloc.c:3453
> Are the values of start and end reasonable values?
> Compare them with the addresses of the first and last stack frames.

That would be the following:

#0  0x40248a51 in kill () from /lib/libc.so.6
and
#70 0x080d6e23 in main (argc=1, argv=0xbffffc54) at emacs.c:1666

The lower bound, 0xbfffd87c, seems reasonable enough comparaing it to
0xbfffd7c8.

(gdb) i frame
Stack level 0, frame at 0xbfffd7c8:
 eip = 0x40248a51 in kill; saved eip 0x811d245
 (FRAMELESS), called by frame at 0xbfffd7c8
 Arglist at 0xbfffd7c8, args: 
 Locals at 0xbfffd7c8, Previous frame's sp in esp
 Saved registers:
  ebp at 0xbfffd7c8, eip at 0xbfffd7cc

The upper bound, 0xbffff9e4, seems reasonable enough comparing it to
0xbffffbf8.

(gdb) up 70
#70 0x080d6e23 in main (argc=1, argv=0xbffffc54) at emacs.c:1666
1666      Frecursive_edit ();
(gdb) i frame
Stack level 70, frame at 0xbffffbf8:
 eip = 0x80d6e23 in main (emacs.c:1666); saved eip 0x40237a51
 caller of frame at 0xbffff988
 source language c.
 Arglist at 0xbffffbf8, args: argc=1, argv=0xbffffc54
 Locals at 0xbffffbf8, Previous frame's sp in esp
 Saved registers:
  ebx at 0xbffff990, ebp at 0xbffffbf8, esi at 0xbffff994, edi at 0xbffff998, 
eip at 0xbffffbfc

> #2  0x0811d245 in mark_object (argptr=0xbfffd844) at alloc.c:4862
> Which stack frame is address 0xbfffd844 in?
> Do `i frame' in each stack frame to see which one
> contains that address.
> Then find what data structure is that in.
> In that frame, try doing `info local' and determine the address
> and size of various locals.  Likewise for the arguments.
> With that info, we may see what's going on.

do some up and i frame, and looking at the line "Stack level n, frame
at 0x...", I guess the this must be frame #2:

Stack level 0, frame at 0xbfffd7c8:
Stack level 1, frame at 0xbfffd7c8:
Stack level 2, frame at 0xbfffd7f8:
Stack level 3, frame at 0xbfffd848:
Stack level 4, frame at 0xbfffd918:

So then:

(gdb) i frame
Stack level 2, frame at 0xbfffd7f8:
 eip = 0x811d245 in mark_object (alloc.c:4862); saved eip 0x811bc1d
 called by frame at 0xbfffd848, caller of frame at 0xbfffd7c8
 source language c.
 Arglist at 0xbfffd7f8, args: argptr=0xbfffd844
 Locals at 0xbfffd7f8, Previous frame's sp in esp
 Saved registers:
  ebx at 0xbfffd7d0, ebp at 0xbfffd7f8, esi at 0xbfffd7d4, edi at 0xbfffd7d8, 
eip at 0xbfffd7fc
(gdb) info local
objptr = (int *) 0x1bb
obj = 153687152
cdr_count = 0
(gdb) i args 
argptr = (int *) 0xbfffd844

Unfortunately, my C debugging skills are mediocre.  I don't know how
to determine the size of these variables.

Alex.
-- 
http://www.emacswiki.org/cgi-bin/alex.pl





reply via email to

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