[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gcl-devel] mac os x port questions
From: |
Aurelien Chanudet |
Subject: |
Re: [Gcl-devel] mac os x port questions |
Date: |
Sat, 14 Feb 2004 22:10:48 +0100 |
Hi all,
Below is what I get with 2.7.0 on Mac OS X v10.3 (a.k.a. Panther).
What's happening is that `page(core_end)' refers to some place beyond
the end of `sgc_type_map', which causes a segmentation fault. On top of
that, we have that MAXPAGE- page(core_end) < 0, although this should be
>= 0.
I would be most grateful if someone could tell me more about `MAXPAGE',
`core_end' and `sgc_type_map'. My understanding is that `core_end'
holds the value of the so-called memory breakpoint.
In the example below, the memory layout is as follow :
- the text segment ranges from 0x00001000 to 0x0010e000
- the data segment ranges from 0x0010e000 to 0x0054c000
- the link edit segment ranges from 0x0054c000 to 0x0077e000
All memory allocation happens in a hand-crafted heap ranging from
0x209f6000 to 0x409f6000. I don't know what we have between the end of
the link edit segment and the start of the hand-crafted heap.
Thanks,
Aurelien
---
Starting program: /src/src/gcl-2.7.0/unixport/raw_pre_gcl
/src/src/gcl-2.7.0/unixport/ -libdir /src/src/gcl-2.7.0/ < foo
Breakpoint 1, set_maxpage () at alloc.c:707
707 page_multiple=getpagesize()/PAGESIZE;
(gdb) c
Continuing.
Breakpoint 1, set_maxpage () at alloc.c:707
707 page_multiple=getpagesize()/PAGESIZE;
(gdb) c
Continuing.
Program received signal EXC_BAD_ACCESS, Could not access memory.
0xffff8660 in __bzero ()
(gdb) up
#1 0x0001b6d8 in set_maxpage () at alloc.c:719
719 bzero(&sgc_type_map[ page(core_end)],MAXPAGE-
page(core_end));
(gdb) p c
$7 = 131072 [ this is the value of MAXPAGE ]
(gdb) p d
$8 = 154322 [ this is the value of page(core_end) ]
(gdb) p core_end
$9 = 0x25be0000 ""
(gdb) p &sgc_type_map
$10 = (char (*)[131072]) 0x481250
(gdb) p sgc_type_map+131072
$11 = 0x4a1250 ""
- Re: [Gcl-devel] mac os x port questions, (continued)
- Re: [Gcl-devel] mac os x port questions, Aurelien Chanudet, 2004/02/13
- Re: [Gcl-devel] mac os x port questions, Aurelien Chanudet, 2004/02/13
- Re: [Gcl-devel] mac os x port questions, Aurelien Chanudet, 2004/02/14
- Re: [Gcl-devel] mac os x port questions, Aurelien Chanudet, 2004/02/14
- Re: [Gcl-devel] mac os x port questions,
Aurelien Chanudet <=
- Re: [Gcl-devel] mac os x port questions, Aurelien Chanudet, 2004/02/15
- Re: [Gcl-devel] mac os x port questions, Aurelien Chanudet, 2004/02/15
- Re: [Gcl-devel] mac os x port questions, Aurelien Chanudet, 2004/02/15
- Re: [Gcl-devel] mac os x port questions, Aurelien Chanudet, 2004/02/16