|Subject:||bug#22526: 25.0.90; Crash starting gnus|
|Date:||Sun, 14 Feb 2016 00:44:01 +0100|
I think the patch I propose below will help in that.
> Anyway, there may be some other interference :
> /* If there is enough room in the current reserved area, then
> commit more pages as needed. */
> if (m2.State == MEM_RESERVE
> && nbytes <= memInfo.RegionSize + m2.RegionSize)
> If the address sent to mmap_realloc() has been messed up by another part of the code, we won't know it,
> VirtualQuery will return
> a wrong value and we will keep taking wrong decisions. For example, if m2.State is not MEM_RESERVE,
> what does that mean?
It means the region after the one we are trying to enlarge was not
reserved by us, and we should call mmap_alloc (which we do). No?
What I'm worried about is something else: the code is written under
the assumption that *var is the base address of the allocation, which
is why we use *var + memInfo.RegionSize to get to the next region.
But if *var is not the base address, this is wrong, and we should use
memInfo.BaseAddress instead, I think. WDYT?
> The error codes from VirtualAlloc() here are crucial.
The error is ERROR_INVALID_PARAMETER (87), as Andy just reported.
|[Prev in Thread]||Current Thread||[Next in Thread]|