[Gc] GC + Windows Mobile + Threads + Patch for WINCE

biosli biosli at hotmail.com
Wed Aug 26 19:59:40 PDT 2009


Dear Ivan:
 
Ivan Maidanski wrote:
> Today I wrote:
>> ...
>>> There is another backtrace for you.(I send a attachment)
>>
>> At present there is 2 differences between true Win32 and WinCE - GC_get_stack_min() and GC_win32_get_mem/GC_wince_get_mem().
>>
>> So, my questions:
>> 0. just a general one - you are running single-core ARM, right?
>> 1. are stacks (on your target) restricted to an aligned 64K region?
>
> Discard the Q about stacks (GC_get_stack_min() is used only to verify stack boundaries, in fact).

0. Yap, dopod P800 is single-core ARM.
 
 
>
> Zeyi Lee wrote:
>>>> The test program crashed.
>>>> Unhandled exception at 0x000181bc in test_libgcd_Wince.exe: 0xC0000005: Access violation reading location 0x00d8fe60.
>>>> In win32 the test program works well.
>>>
>>> Here is some problem. Could you run it under debugger (if that isn't difficult for you) and tell me backtrace where SEGV occurs?
>> It happens at called GC_gcollect(), and the call stack stopped at GC_mark_from().
>> 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.
Test Output(on VS Debug Window):
......
The thread 'GC_win32_start' (0xef0ccb2e) has exited with code 0 (0x0).
The thread 'GC_win32_start' (0xee2683fe) has exited with code 0 (0x0).
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
The thread 'GC_win32_start' (0x6d614dba) has exited with code 0 (0x0).
The thread 'GC_win32_start' (0x4edd1e46) has exited with code 0 (0x0).
The thread 'GC_win32_start' (0x8ec1381a) has exited with code 0 (0x0).
......
Received WM_CLOSE, closing window
The thread 'GC_win32_start' (0x6ee2bd52) has exited with code 0 (0x0).
Completed 6 tests
Allocated 791825 collectable objects
Allocated 1212 uncollectable objects
Allocated 0 atomic objects
Allocated 0 stubborn objects
Finalized 1673/1673 objects - finalization is probably ok
Total number of bytes allocated is 23947298
Final heap size is 15941632 bytes
Collector appears to work
The thread 'GC_win32_start' (0x8e26863e) has exited with code 0 (0x0).
Unload module: chsime03.dll
The program '[cee0d6ae] test_libgcd_Wince.exe' has exited with code 0 (0x0).
 
 
> If that works, I'll prepare the proper patch.
 
 
Best wishes,
GC Beginner
Zeyi Lee
_________________________________________________________________
与任何您希望的人分享您的回忆。
http://www.microsoft.com/china/windows/windowslive/products/photos-share.aspx?tab=1


More information about the Gc mailing list