This is a mirror of official site: http://jasper-net.blogspot.com/

Memory Corruption, GC, and Overlapping Objects

| Thursday, May 19, 2011
Dima has brought to my attention a nasty bug probably attributed to a memory corruption. The bug’s manifestation is usually an access violation in a completely unrelated piece of code, oftentimes causing an ExecutionEngineException.

This is an example of an access violation of the above variety (some of the output was snipped for brevity):

0:004> .loadby sos clr 
0:004> g 
(510.c88): Access violation - code c0000005 (first chance) 
First chance exceptions are reported before any exception handling. 
This exception may be expected and handled. 
00742a11 8b4028          mov     eax,dword ptr [eax+28h] ds:002b:0000002c=???????? 

0:000> !CLRStack 
OS Thread Id: 0xc88 (0) 
Child SP IP       Call Site 
004bedb8 00742a11 OverlappingObjects.Program.Main(System.String[]) [\OverlappingObjects\Program.cs @ 51] 
004beff0 724221bb [GCFrame: 004beff0] 

0:000> k 
ChildEBP RetAddr  
WARNING: Frame IP not in any known module. Following frames may be wrong. 
004bedc4 724221bb 0x742a11 
004bedd4 72444be2 clr!CallDescrWorker+0x33 
004bee50 72444d84 clr!CallDescrWorkerWithHandler+0x8e 

Posted via email from Jasper-net

0 comments: