Remove disabled ntdll-Heap_Delay_Free patchset.

The patchset was never actually enabled in a release because it caused various
regressions. Some applications depend on use-after-frees, others depend on the
fact that HeapAlloc() returns the previously used memory address after a
HeapFree.
This commit is contained in:
Sebastian Lackner 2016-04-30 21:04:42 +02:00
parent 853e7bea82
commit d77c36c405
2 changed files with 0 additions and 46 deletions

View File

@ -1,37 +0,0 @@
From 5591da91355f5d1ed7238deaaa9939e36101b5e1 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 7 May 2015 01:26:49 +0200
Subject: ntdll: Mimic the Windows heap management and delay reusing freed
blocks.
---
dlls/ntdll/heap.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c
index 95c3554..a5fb206 100644
--- a/dlls/ntdll/heap.c
+++ b/dlls/ntdll/heap.c
@@ -628,7 +628,8 @@ static void HEAP_MakeInUseBlockFree( SUBHEAP *subheap, ARENA_INUSE *pArena )
ARENA_FREE *pFree;
SIZE_T size;
- if (heap->pending_free)
+ if (heap->pending_free && ((pArena->size & ARENA_SIZE_MASK) < 0x1000 ||
+ (heap->flags & HEAP_FREE_CHECKING_ENABLED) || RUNNING_ON_VALGRIND))
{
ARENA_INUSE *prev = heap->pending_free[heap->pending_pos];
heap->pending_free[heap->pending_pos] = pArena;
@@ -1506,8 +1507,7 @@ void heap_set_debug_flags( HANDLE handle )
large->block_size - sizeof(*large) - large->data_size, flags );
}
- if ((heap->flags & HEAP_GROWABLE) && !heap->pending_free &&
- ((flags & HEAP_FREE_CHECKING_ENABLED) || RUNNING_ON_VALGRIND))
+ if ((heap->flags & HEAP_GROWABLE) && !heap->pending_free)
{
void *ptr = NULL;
SIZE_T size = MAX_FREE_PENDING * sizeof(*heap->pending_free);
--
2.3.7

View File

@ -1,9 +0,0 @@
#Fixes: Wait before reusing recently freed memory
# This patch fixes a couple of bugs, but causes other
# failures. Disabled until a better solution is found.
Disabled: true
# Known issues:
# https://bugs.wine-staging.com/show_bug.cgi?id=276
# https://bugs.wine-staging.com/show_bug.cgi?id=277