ntdll-ForceBottomUpAlloc: fix a crash in debug.c:init_options().

After upstream commit 62a979347a4dc1bd68f79b86397de85c016ec588
any TRACE() present on the way of virtual_init() will cause
a crash with WINEDEBUG present regardless of actual debug channels.
Avoid TRACE in virtual_init().
This commit is contained in:
Paul Gofman 2023-12-03 15:28:46 -06:00
parent 33d3ba124f
commit c55ec69939
4 changed files with 10 additions and 18 deletions

View File

@ -1,4 +1,4 @@
From 2cfc62af875b430912bbffcf37f4ffc4302734b5 Mon Sep 17 00:00:00 2001
From 33961353f1d7e0590c83927e632a6d43b2a81fa2 Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Tue, 14 Jan 2020 21:39:23 +0300
Subject: [PATCH] ntdll: Increase step after failed map attempt in

View File

@ -1,4 +1,4 @@
From c00a800b3246b57ade14cddd7fa076f9d63fe151 Mon Sep 17 00:00:00 2001
From d853eba76fd849e21b5cb4ce0a3f113ba9beea87 Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Thu, 23 Jul 2020 18:40:39 +0300
Subject: [PATCH] ntdll: Increase free ranges view block size on 64 bit.

View File

@ -1,4 +1,4 @@
From 89030b137479fd06a498020327dfc54593fc9c57 Mon Sep 17 00:00:00 2001
From 22f53694277313639b0ca00f6f075407839737e7 Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Mon, 25 Nov 2019 12:19:20 +0300
Subject: [PATCH] ntdll: Force virtual memory allocation order.
@ -12,11 +12,11 @@ are from higher memory than they expect.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48175
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46568
---
dlls/ntdll/unix/virtual.c | 411 +++++++++++++++-----------------------
1 file changed, 165 insertions(+), 246 deletions(-)
dlls/ntdll/unix/virtual.c | 410 +++++++++++++++-----------------------
1 file changed, 164 insertions(+), 246 deletions(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index 30d0df85fba..fe6dc86c80b 100644
index 30d0df85fba..a14bbb852f8 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -1246,43 +1246,15 @@ static struct file_view *find_view_range( const void *addr, size_t size )
@ -503,15 +503,7 @@ index 30d0df85fba..fe6dc86c80b 100644
return res;
}
@@ -3283,6 +3200,7 @@ void virtual_init(void)
if (preload_reserve_start)
address_space_start = min( address_space_start, preload_reserve_start );
}
+ TRACE("preload reserve %p-%p.\n", preload_reserve_start, preload_reserve_end);
}
/* try to find space in a reserved area for the views and pages protection table */
@@ -6110,6 +6028,7 @@ NTSTATUS WINAPI NtWow64AllocateVirtualMemory64( HANDLE process, ULONG64 *ret, UL
@@ -6110,6 +6027,7 @@ NTSTATUS WINAPI NtWow64AllocateVirtualMemory64( HANDLE process, ULONG64 *ret, UL
*ret = (ULONG_PTR)base;
*size_ptr = size;
}

View File

@ -1,4 +1,4 @@
From fa77cda3f27c53e907b9dce6d15dd767be73bd85 Mon Sep 17 00:00:00 2001
From 7c62f566f9b48dacab5cc79dac496f498aaae68b Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Fri, 1 Dec 2023 14:55:20 -0600
Subject: [PATCH] ntdll: Exclude natively mapped areas from free areas list.
@ -8,7 +8,7 @@ Subject: [PATCH] ntdll: Exclude natively mapped areas from free areas list.
1 file changed, 95 insertions(+), 9 deletions(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index fe6dc86c80b..c0698e15eb6 100644
index a14bbb852f8..491597dcb76 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -127,6 +127,7 @@ struct file_view
@ -196,7 +196,7 @@ index fe6dc86c80b..c0698e15eb6 100644
}
status = create_view( view_ret, ptr, size, vprot );
if (status != STATUS_SUCCESS) unmap_area( ptr, size );
@@ -4256,7 +4337,12 @@ void virtual_set_force_exec( BOOL enable )
@@ -4255,7 +4336,12 @@ void virtual_set_force_exec( BOOL enable )
WINE_RB_FOR_EACH_ENTRY( view, &views_tree, struct file_view, entry )
{
/* file mappings are always accessible */