[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GC bug
From: |
Alex Schroeder |
Subject: |
Re: GC bug |
Date: |
Thu, 19 Jun 2003 13:45:47 +0200 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
I just tried x/x on the two variables I mentioned in my last mail:
(gdb) x/x obj
0x87c61b4: 0x00005eb5
(gdb) x/x objptr
0x24b: Cannot access memory at address 0x24b
Alex.
Alex Schroeder <address@hidden> writes:
> Yesterday I think I forgot the address and the size of the variables
> in question. Since I think that now I have found a more or less
> reliable way to crash Emacs, here goes another bt:
>
> (gdb) bt
> #0 0x40248a51 in kill () from /lib/libc.so.6
> #1 0x080d5b1a in abort () at emacs.c:417
> #2 0x0811d245 in mark_object (argptr=0xbfffd4a4) at alloc.c:4862
>
>> #2 0x0811d245 in mark_object (argptr=0xbfffd4a4) at alloc.c:4862
>> Which stack frame is address 0xbfffd4a4 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 0xbfffd428
> Stack level 1, frame at 0xbfffd428
> Stack level 2, frame at 0xbfffd458
> Stack level 3, frame at 0xbfffd4a8
> ...
> Stack level 82, frame at 0xbffffbf8
>
> Details for #2:
>
> (gdb) i frame
> Stack level 2, frame at 0xbfffd458:
> eip = 0x811d245 in mark_object (alloc.c:4862); saved eip 0x811bc1d
> called by frame at 0xbfffd4a8, caller of frame at 0xbfffd428
> source language c.
> Arglist at 0xbfffd458, args: argptr=0xbfffd4a4
> Locals at 0xbfffd458, Previous frame's sp in esp
> Saved registers:
> ebx at 0xbfffd430, ebp at 0xbfffd458, esi at 0xbfffd434, edi at 0xbfffd438,
> eip at 0xbfffd45c
>
> Locals:
>
> (gdb) i locals
> objptr = (int *) 0x24b
> obj = 142369204
> cdr_count = 0
>
> (gdb) p &objptr
> Address requested for identifier "objptr" which is in register $ebx
> (gdb) p sizeof(objptr)
> $2 = 4
> (gdb) p &obj
> Address requested for identifier "obj" which is in register $edx
> (gdb) p sizeof(obj)
> $3 = 4
> (gdb) p &cdr_count
> $4 = (int *) 0xbfffd454
> (gdb) p sizeof(cdr_count)
> $5 = 4
--
http://www.emacswiki.org/cgi-bin/alex.pl
- GC bug, Alex Schroeder, 2003/06/10