Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock

Please unblock package wine


[ Reason ]
Bernhard Übelacker identified the fixes required for #1104317 (an RC
bug on 32-bit architectures), and they have been applied in repack-6.

[ Impact ]
As before, since #1104317 is RC, wine is likely not to ship if the
fixed package doesn't migrate. At least this time this is the only RC
issue…

[ Tests ]
No automated tests in the Debian package, but this has been tested
upstream and I've checked that it works locally, as a Bernhard (see
#1104317).

[ Risks ]
The fix involves a small number of lines, and while it’s not simple,
it makes sense to me. wine is a leaf package with no alternative.

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

unblock wine/10.0~repack-6

Regards,

Stephen
diff -Nru wine-10.0~repack/debian/changelog wine-10.0~repack/debian/changelog
--- wine-10.0~repack/debian/changelog   2025-06-11 00:03:42.000000000 +0200
+++ wine-10.0~repack/debian/changelog   2025-06-26 09:00:48.000000000 +0200
@@ -1,3 +1,11 @@
+wine (10.0~repack-6) unstable; urgency=medium
+
+  * Apply upstream patches fixing relocation entry point handling in
+    builtin modules; thanks to Bernhard Übelacker for the investigation!
+    Closes: #1104317.
+
+ -- Stephen Kitt <sk...@debian.org>  Thu, 26 Jun 2025 09:00:48 +0200
+
 wine (10.0~repack-5) unstable; urgency=medium
 
   * Build appropriately for vulkan 1.4 (closes: #1104898).
diff -Nru wine-10.0~repack/debian/patches/fixes/ntdll-398da925.patch 
wine-10.0~repack/debian/patches/fixes/ntdll-398da925.patch
--- wine-10.0~repack/debian/patches/fixes/ntdll-398da925.patch  1970-01-01 
01:00:00.000000000 +0100
+++ wine-10.0~repack/debian/patches/fixes/ntdll-398da925.patch  2025-06-26 
08:56:25.000000000 +0200
@@ -0,0 +1,19 @@
+commit 398da92511b51d3ee4ce7c77bfe6d738621bfbfa
+Author: Alexandre Julliard <julli...@winehq.org>
+Date:   Mon Mar 10 11:47:05 2025 +0100
+
+    ntdll: Update the main exe entry point when the module is relocated.
+
+diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
+index 06a260cfe3f..a22f6209dd1 100644
+--- a/dlls/ntdll/unix/virtual.c
++++ b/dlls/ntdll/unix/virtual.c
+@@ -3526,6 +3526,8 @@ NTSTATUS virtual_map_module( HANDLE mapping, void 
**module, SIZE_T *size, SECTIO
+         status = virtual_map_image( mapping, module, size, shared_file, 
limit_low, limit_high, 0,
+                                     machine, image_info, filename, FALSE );
+         virtual_fill_image_information( image_info, info );
++        if (status == STATUS_IMAGE_NOT_AT_BASE)
++            info->TransferAddress = (char *)*module + image_info->entry_point;
+     }
+     if (shared_file) NtClose( shared_file );
+     free( image_info );
diff -Nru wine-10.0~repack/debian/patches/fixes/ntdll-5c45391e.patch 
wine-10.0~repack/debian/patches/fixes/ntdll-5c45391e.patch
--- wine-10.0~repack/debian/patches/fixes/ntdll-5c45391e.patch  1970-01-01 
01:00:00.000000000 +0100
+++ wine-10.0~repack/debian/patches/fixes/ntdll-5c45391e.patch  2025-06-26 
08:56:10.000000000 +0200
@@ -0,0 +1,36 @@
+commit 5c45391e9f79854915c50a15054f2de4888596a2
+Author: Yuxuan Shui <ys...@codeweavers.com>
+Date:   Sat May 3 21:57:23 2025 +0100
+
+    ntdll: Also relocate entry point for builtin modules.
+    
+    Discovered while I was working on ASan support. ASan shadow memory
+    might be placed where the main image is normally loaded, forcing it to
+    relocate.
+
+diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
+index 202894750a0..c797c89952f 100644
+--- a/dlls/ntdll/unix/virtual.c
++++ b/dlls/ntdll/unix/virtual.c
+@@ -3424,10 +3424,11 @@ static NTSTATUS virtual_map_image( HANDLE mapping, 
void **addr_ptr, SIZE_T *size
+     status = map_image_into_view( view, filename, unix_fd, image_info, 
machine, shared_fd, needs_close );
+     if (status == STATUS_SUCCESS)
+     {
++        image_info->base = wine_server_client_ptr( view->base );
+         SERVER_START_REQ( map_image_view )
+         {
+             req->mapping = wine_server_obj_handle( mapping );
+-            req->base    = wine_server_client_ptr( view->base );
++            req->base    = image_info->base;
+             req->size    = size;
+             req->entry   = image_info->entry_point;
+             req->machine = image_info->machine;
+@@ -3835,8 +3836,6 @@ NTSTATUS virtual_map_module( HANDLE mapping, void 
**module, SIZE_T *size, SECTIO
+         status = virtual_map_image( mapping, module, size, shared_file, 
limit_low, limit_high, 0,
+                                     machine, image_info, filename, FALSE );
+         virtual_fill_image_information( image_info, info );
+-        if (status == STATUS_IMAGE_NOT_AT_BASE)
+-            info->TransferAddress = (char *)*module + image_info->entry_point;
+     }
+     if (shared_file) NtClose( shared_file );
+     free( image_info );
diff -Nru wine-10.0~repack/debian/patches/series 
wine-10.0~repack/debian/patches/series
--- wine-10.0~repack/debian/patches/series      2025-06-10 23:59:51.000000000 
+0200
+++ wine-10.0~repack/debian/patches/series      2025-06-26 08:57:26.000000000 
+0200
@@ -27,6 +27,8 @@
 fixes/virtual-protect.patch
 fixes/printer-resolution.patch
 fixes/temporary-directory.patch
+fixes/ntdll-398da925.patch
+fixes/ntdll-5c45391e.patch
 
 arm/1-73ab9ca8.patch
 arm/2-0621c022.patch

Reply via email to