Random crashes while running (cmd) test runner

Marcus Meissner meissner at suse.de
Mon Jul 4 07:19:29 CDT 2011


On Mon, Jul 04, 2011 at 02:01:31PM +0200, Frédéric Delanoy wrote:
> On Mon, Jul 4, 2011 at 13:37, Marcus Meissner <meissner at suse.de> wrote:
> > On Mon, Jul 04, 2011 at 12:32:47PM +0200, Frédéric Delanoy wrote:
> >> 2011/7/4 Stefan Dösinger <stefandoesinger at gmx.at>:
> >> > Am 04.07.2011 um 10:28 schrieb Marcus Meissner:
> >> >> export WINEDEBUG=+heap
> >> > WINEDEBUG=warn+heap adds the corruption checking but not the debug output
> >>
> >> I get the following:
> >> batch.c:306: running TEST_BUILTINS.CMD test...
> >> batch.c:215: Test failed: unexpected char 0x73 position 0 in line 1
> >> (got 'should fail', wanted 'dir')
> >> batch.c:227: Test failed: too long output, got additional Volume
> >> Serial Number is 0000-0000
> >>
> >> (dir output)
> >>
> >> err:heap:HEAP_ValidateInUseArena Heap 0x110000: block 0x11c8a0 tail
> >> overwritten at 0x11c8bc (byte 0/12 == 0x64)
> >> batch: 14 tests executed (0 marked as todo, 2 failures), 0 skipped.
> >>
> >> See http://pastebin.com/T4E63M5S for full log and heap dump
> >
> > The first error appears around line 328:
> >
> > trace:heap:RtlAllocateHeap (0x110000,70000062,0000001c): returning 0x11c898
> > err:heap:HEAP_ValidateInUseArena Heap 0x110000: block 0x11c898 tail overwritten at 0x11c8b4 (byte 0/12 == 0x64)
> > Heap: 0x110000
> > Next: 0x110000  Sub-heaps: 0x110014
> > Free lists:
> >  Block   Stat   Size    Id
> >
> > It would be interesting to know what happened there in the testsuite.
> > You could e.g. add +relay or similar.
> 
> http://pastebin.com/6bV5BGQc


003c:Call ntdll.RtlAllocateHeap(00110000,00000000,0000001c) ret=7effad94
trace:heap:RtlAllocateHeap (0x110000,70000062,0000001c): returning 0x1213d8
003c:Ret  ntdll.RtlAllocateHeap() retval=001213d8 ret=7effad94
003c:Call KERNEL32.TlsGetValue(00000000) ret=7effc041
003c:Ret  KERNEL32.TlsGetValue() retval=00120b28 ret=7effc041
003c:Call KERNEL32.TlsGetValue(00000000) ret=7effc041
003c:Ret  KERNEL32.TlsGetValue() retval=00120b28 ret=7effc041
003c:Call KERNEL32.CreateFileA(7effd262 "test.cmd",40000000,00000000,00000000,00000002,00000080,00000000) ret=7effaf5a
err:heap:HEAP_ValidateInUseArena Heap 0x110000: block 0x1213d8 tail overwritten at 0x1213f4 (byte 0/12 == 0x64)
Heap: 0x110000
Next: 0x110000  Sub-heaps: 0x110014


As it happens right before the test.cmd creation, it is very likely the function
static const char* replace_escaped_spaces(const char *data, DWORD size, DWORD *new_size)

At least the final \0 seems not to be counted during the HeapAlloc() in this function, perhaps
just adding +1 in the HeapAlloc() will help.

Ciao, Marcus



More information about the wine-devel mailing list