[Gc] Re: Re: Re[4]: : Program broken

Hugn up2dream at gmail.com
Sat Sep 26 18:48:48 PDT 2009


Ivan Maidanski <ivmai at ...> writes:

> 
> Hi!
> 
> Hugn <up2dream at ...> wrote:
> > > > ...
> > > > My platform is wince 5(Pocket PC).
> > > > ...
> > I called GC_INIT() before GC_dump().
> > ...
> > The below code in GC_register_dynamic_libraries is never 
> > invoked(DEBUG_VIRTUALQUERY  is defined).
> > #               ifdef DEBUG_VIRTUALQUERY
> >                   GC_dump_meminfo(&buf);
> > #               endif
> > So, I add GC_dump_meminfo(&buf) before 'new_limit = (char *)p + 
buf.RegionSize;'
> > Now, it can output some message about buf:
> > BaseAddress = 13000, AllocationBase = 10000, RegionSize = 1000(4096)
> > 	AllocationProtect = 1, State = 2000, Protect = 1, Type = 1000000
> > ...
> > GC Warning: Thread stack pointer 0005FADC out of range, pushing everything
> > ***Static roots:
> > Total size: 0
> > ...
> > I used a custom wince 6(for a EBook). But this problem is not exist on wince 
> > emulator with visual studio and HTC TouchHD device.
> 
> If understood right, the problem observed on WinCE 5but not not on WinCE 6 or 
emulation, right?

The problem observed on custom WinCE6 emulator and device. The system is builded 
with platform builder. On standard WinCE5/WinCE6 it worked with no bug like 
this. I have update source to lastest CVS commits.
> 
> 1. could you temporarily try (in dyn_load.c) replace:
>  define GC_wnt TRUE -> define GC_wnt FALSE
> 
If I define GC_wnt FALSE, the program will crash. The invoke stack is:

>	HostApp.exe!GC_abort(const char* msg = 0x0084981c) 行: 1238, 字节偏移量: 
0x4c	C
 	HostApp.exe!GC_push_stack_for(GC_Thread_Rep* thread = 0x0086efc8) 行: 
1228, 字节偏移量: 0x314	C
 	HostApp.exe!GC_push_all_stacks(void) 行: 1287, 字节偏移量: 0x98	C
 	HostApp.exe!GC_default_push_other_roots(void) 行: 2245, 字节偏移量: 0x08	
C
 	HostApp.exe!GC_push_roots(int all = 1, char* cold_gc_frame = 0x009df384) 
行: 795, 字节偏移量: 0x15c	C
 	HostApp.exe!GC_mark_some_inner(char* cold_gc_frame = 0x009df384) 行: 
359, 字节偏移量: 0x240	C
 	HostApp.exe!GC_mark_some(char* cold_gc_frame = 0x009df384) 行: 504, 字节
偏移量: 0x1c	C
 	HostApp.exe!GC_stopped_mark(int (void)* stop_func = 0x00032e30) 行: 592, 
字节偏移量: 0x124	C
 	HostApp.exe!GC_try_to_collect_inner(int (void)* stop_func = 0x00032e30) 
行: 416, 字节偏移量: 0x15c	C
 	HostApp.exe!GC_init(void) 行: 855, 字节偏移量: 0x550	C
 	HostApp.exe!WinMain(HINSTANCE__* hInst = 0x090f0006, HINSTANCE__* hPrev 
= 0x00000000, wchar_t* lpCmdLine = 0x009dfe8c, int iShowCmd = 5) 行: 205, 字节偏
移量: 0x24	C++
 	HostApp.exe!WinMainCRTStartup(HINSTANCE__* hInstance = 0x00000001, 
HINSTANCE__* hInstancePrev = 0xd1dffe60, unsigned short* lpszCmdLine = 
0x009dff00, int nCmdShow = 1) 行: 21, 字节偏移量: 0x38	C

> 2. could you also use -DDEBUG_THREADS and tell me what's printed after "GC 
Warning: Thread stack pointer..."?

I wrote a simplest program(only include GC_INIT() and GC_dump()) and add -
DDEBUG_THREADS. The log is :

Marking thread locals for 0x95a0002
GC Warning: Thread stack pointer 0005FAD4 out of range, pushing everything
Pushing stack for 0x95a0002 from (min) 00060000 to 00061000 from 0x95a0002
***Static roots:
Total size: 0

***Heap sections:
Total heap size: 65536
Section 0 from 00140000 to 00150000 0/16 blacklisted

***Free blocks:
Free list 16:
	00140000 size 65536 not black listed
Total of 65536 bytes on free list

***Blocks in use:
(kind(0=ptrfree,1=normal,2=unc.):size_in_bytes, #_marks_set)

blocks = 0, bytes = 0
> 
> Bye.
> 






More information about the Gc mailing list