Re: [Gc] GC + Windows Mobile + Threads + Patch for WINCE
ivmai at mail.ru
Thu Aug 27 00:44:47 PDT 2009
Zeyi Lee wrote:
> >> Line: 835 current = *(word *)current_p; or Line: 810 deferred = *(word *)limit;
> >> (I send a attachment of backtrace pic. I hope it is helpful.)
> >> And I found it is not crash every time.
> > I think I found the solution: in mark.c search for "ifndef __GNUC__" and temporarily replace previous "ifdef MSWIN32" to "defined(MSWIN32) || defined(MSWINCE)" and retry the cases 2 and 3 with temporarily added -DWRAP_MARK_SOME.
> I change the code as you said.
> The test program works with "Data Abort", but no crash.
> Before the changes, when "Data Abort" happened, the program crash.
> Data Abort: Thread=8ef26bdc Proc=8c398430 'test_libgcd_Wince.exe'
> AKY=00020001 PC=0001972c(test_libgcd_Wince.exe+0x0000972c) RA=00018fb0(test_libgcd_Wince.exe+0x00008fb0) BVA=244cf1f8 FSR=00000007
> Collector appears to work
Well, so, it works. But I don't like this thing (not only because it prints "data abort" in the debug console, but also because GCC doesn't understand __try/__except). The problem describe as follows:
/* Windows 98 appears to asynchronously create and remove */
/* writable memory mappings, for reasons we haven't yet */
/* understood. Since we look for writable regions to */
/* determine the root set, we may try to mark from an */
/* address range that disappeared since we started the */
/* collection. Thus we have to recover from faults here. */
/* This code does not appear to be necessary for Windows */
/* 95/NT/2000+. */
As it turns this also required in WinCE (unfortunately) for reasons we haven't yet understood. I'd like you to undo the changes (above) and change "define GC_wnt FALSE" (in dyn_load.c) to "define GC_wnt TRUE". If this won't help, I'd like you to execute VirtualQuery for current_p (or limit) which causes SEGV and post me the info it returns.
>> Line: 835 current = *(word *)current_p; or Line: 810 deferred = *(word *)limit;
> Zeyi Lee
More information about the Gc