Bug in the heap management code?

Michael Günnewig MichaelGuennewig at gmx.de
Sun Sep 21 06:14:24 CDT 2003


MichaelGuennewig at gmx.de (Michael Günnewig) writes:

> Mike Hearn <mike at theoretic.com> writes:
>
>> This is very much like a problem I am having with InstallShield.
>> Something, somewhere, is trashing the heap data structures, which causes
>> a crash some time later, often yards away from the original bug. As far
>> as I know, there is no good way to spot this problem, it's just C/C++
>> sucking.... maybe valgrind might help?

Have done some tests with some other programms which seems to work and
get the following (and some more which I was able to fix myself):
,-----
| ==3597== 6 errors in context 4 of 5:
| ==3597== Conditional jump or move depends on uninitialised value(s)
| ==3597==    at 0x402606D7: HEAP_ValidateInUseArena (heap.c:854)
| ==3597==    by 0x40260A40: HEAP_IsRealArena (heap.c:965)
| ==3597==    by 0x402615F2: RtlValidateHeap (heap.c:1489)
| ==3597==    by 0x4145E5B0: HeapValidate (heap.c:199)
| ==3597== 
`-----

At heap.c:854 (it's ntdll/heap.c Version 1.23):
    ,-----
851 |     }
852 | 
853 |     /* Check magic number */
854 |     if (pArena->magic != ARENA_INUSE_MAGIC)
855 |     {
856 |         if (quiet == NOISY) {
857 |         ERR("Heap %08lx: invalid in-use arena magic for %08lx\n",
    `-----

And when I quit "The Elder Scrolls III: Tribunal" version 1.4.1313
german before it bombs, I sometimes get the error message from line 857.

Will try to find out who is the bad guy ... can someone guide me?


  Michael





More information about the wine-devel mailing list