Zebediah Figura (@zfigura) commented about dlls/mspatcha/pa19.c:
> + }
> +
> + nt_headers->OptionalHeader.ImageBase = (DWORD)new_image_base;
> + result = TRUE;
> +
> + reloc_dir_remaining = (LONG)reloc_dir_size;
> + while (reloc_dir_remaining > 0) {
> +
> + if (reloc_block->SizeOfBlock <= (ULONG)reloc_dir_remaining
> + && reloc_block->SizeOfBlock > sizeof(IMAGE_BASE_RELOCATION))
> + {
> + reloc_block_base = (IMAGE_BASE_RELOCATION UNALIGNED *)(mapped_image_base +
> + image_rva_to_file_offset(nt_headers, reloc_block->VirtualAddress, mapped_image_base, mapped_image_size));
> + if (reloc_block_base)
> + {
> + reloc = (USHORT UNALIGNED *)((PUCHAR)reloc_block + sizeof(IMAGE_BASE_RELOCATION));
I don't think we want UNALIGNED, not least because it doesn't do anything on non-MSVC compilers. If any of these actually can be unaligned (can they?) then I think we should just use memcpy.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3870#note_45759
I'm aware that winecfg allows unlinking of symlinked folders, but this is very annoying when regularly recreating WINEPREFIXES. This change makes it easy to isolate those folders from the start.
--
v4: ntdll: Add environment variable to prevent symlinking dosdevices/z:
shell32: Add environment variable to prevent symlinking home folders
https://gitlab.winehq.org/wine/wine/-/merge_requests/3259
This is mostly just no-ops moving stuff around except for last patch, so they're in a consistent ordering for when we'll replace them to dispex vtbl methods, keeping those patches smaller and more obvious what they change.
Next MR will convert query_interface (and maybe destructor, QI will need a bit more prep work first).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3881
--
v3: dmime: Pass the DMUS_PMSG through the performance graph.
dmime: Rename DMUS_PMSGToItem to message_from_DMUS_PMSG.
dmime: Remove unnecessary struct message members.
dmime: Use a struct list to keep performance messages.
dmime: Get rid of the DMUS_PMSGItem typedef.
dmime: Convert DMUS_PMSG music and reference times in SendPMsg.
dmime/tests: Test that SendPMsg also converts reference time.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3851
This clears up much of the todo list for mspatcha. GetFilePatchSignature* and NormalizeFileForPatchSignature have now been implemented in these changes.
These changes bring better support for things like the Adobe Acrobat installer without the need for things like the winetricks mspatcha.dll native dll override. Still needed is support for interleaved streams in the LZXD decompression logic, however this is a great start to better supporting software installers that use the Windows interface for creating and applying patches to files.
--
v3: Add vscode workspace setup
https://gitlab.winehq.org/wine/wine/-/merge_requests/3870
This patch-set adds the definitions and struct modifications required to eventually implement `FileRenameInformationEx` and `FileLinkInformationEx`.
The initial tests are copies of the tests for `FileRenameInformation` and `FileLinkInformation`, but with the `ReplaceIfExists` field replaced with the equivalient `Flag` value: `FILE_RENAME_REPLACE_IF_EXISTS` or `FILE_LINK_REPLACE_IF_EXISTS` respectively.
--
v2: ntdll/tests: Test both FileLinkInformation and FileLinkInformationEx in test_file_link_information.
include: Add flags to FILE_LINK_INFORMATION used by FileLinkInformationEx.
ntdll/tests: Test both FileRenameInformation and FileRenameInformationEx in test_file_rename_information.
include: Add flags to FILE_RENAME_INFORMATION used by FileRenameInformationEx.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3836
--
v3: gdiplus/tests: add tests of InterpolationMode Bilinear for GdipDrawImagePointsRect
gdiplus: implement PixelOffsetMode Half and HighQuality for GdipDrawImagePointsRect
https://gitlab.winehq.org/wine/wine/-/merge_requests/3877
Force as to emit expected CIE/FDE information for x86_64 CPU
in .debug_frame section.
This has been unveiled by 425bd55b02e375b9ac8f79b254ce3ca5c9e72719
(before this commit, the .cfi directives where not emitted by
winebuild).
x86_64-w64-mingw32-as on x86_64 emits "strange" unwinding
information (from winebuild).
00000000 0000000000000014 ffffffff CIE
Version: 1
Augmentation: ""
Code alignment factor: 1
Data alignment factor: -8
Return address column: 32
DW_CFA_def_cfa: r7 (rsp) ofs 8
DW_CFA_offset: r32 (xmm15) at cfa-8
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
Consequence: in unwinding, xmm15 gets updated, but rip isn't, causing
an infinite loop in dbghelp.
Wine-Bug-Id: https://bugs.winehq.org/show_bug.cgi?id=55560
Signed-off-by: Eric Pouech <epouech(a)codeweavers.com>
--
v2: tools/winebuild: Emit SEH unwind information instead of dwarf.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3873
On Windows, `listen()` throws `WSAEOPNOTSUPP` when provided with a `SOCK_DGRAM` socket. Wine currently only throws `WSAEOPNOTSUPP` if the socket is bound; otherwise it throws `WSAEINVAL`. This patch modifies the `IOCTL_AFD_LISTEN` case in wineserver's `sock_ioctl()` throw `WSAEOPNOTSUPP` if it's passed an unbound `SOCK_DGRAM` socket.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3878
--
v3: gdiplus: Include the newline in the measurement of each line.
gdiplus/tests: Add test for bounds of newline.
win32u: Detect and handle characters that are considered to have no width for GetTextExtentExPoint.
gdi32/tests: Add test for width of carriage return and line feed.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3517
Windows 10 [received support](https://devblogs.microsoft.com/commandline/af_unix-comes-to-window… for AF_UNIX sockets in Insider Build 17063. This merge request adds basic support for AF_UNIX sockets to ws2_32 and wineserver.
Of particular note is the difficulty in handling `sun_path`. Most of the functions that allow for translating Windows paths to Unix paths are not accessible from ws2_32. I considered the following options:
* Pass the Windows path to wineserver and do the conversion there.
* This is, as far as I can tell, not possible without major rearchitecting. wineserver does not have functions to translate Windows paths to Unix paths, for obvious reasons.
* Obtain the current working directory of the requesting process and temporarily change directories to there.
* This only handles relative paths and fails for absolute paths, UNC paths, etc.
* Conditionally change directories based on whether the path is relative or not.
* This is error-prone and wineserver does not have the requisite functions to do this cleanly.
I ultimately decided to pass the translated Unix path to wineserver, which changes directories to `dirname(path)`. It then provides `bind` and `connect` with `basename(path)`. This is not threadsafe, but wineserver is not (currently) multithreaded.
Abstract sockets are not fully supported by this patch, matching the behavior of Windows.
--
v53: ws2_32/tests: Add test for AF_UNIX sockets fix.
server: Fix getsockname() and accept() on AF_UNIX sockets.
server: Introduce error when attempting to create a SOCK_DGRAM AF_UNIX socket.
server: Allow for deletion of socket files.
ws2_32: Add support for AF_UNIX sockets.
ntdll/unix: Add support for AF_UNIX sockets to multiple functions.
ws2_32: Add afunix.h header.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2786
It's possible that a state object pointer not in the topology node collection gets passed to
session_get_node_object(). Instead of returning the last node when the object is not found, we
should return a NULL so that the state of the last node is not changed by mistake.
--
v7: mf/tests: Test IMFMediaSession::Start().
mf/tests: Add a create_test_topology() helper.
mf: Add seeking support for IMFMediaSession::Start().
mf: Add a session_flush_nodes() helper.
mf: Make session_get_node_object() more robust.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3572
Force as to emit expected CIE/FDE information for x86_64 CPU
in .debug_frame section.
This has been unveiled by 425bd55b02e375b9ac8f79b254ce3ca5c9e72719
(before this commit, the .cfi directives where not emitted by
winebuild).
x86_64-w64-mingw32-as on x86_64 emits "strange" unwinding
information (from winebuild).
00000000 0000000000000014 ffffffff CIE
Version: 1
Augmentation: ""
Code alignment factor: 1
Data alignment factor: -8
Return address column: 32
DW_CFA_def_cfa: r7 (rsp) ofs 8
DW_CFA_offset: r32 (xmm15) at cfa-8
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
Consequence: in unwinding, xmm15 gets updated, but rip isn't, causing
an infinite loop in dbghelp.
Wine-Bug-Id: https://bugs.winehq.org/show_bug.cgi?id=55560
Signed-off-by: Eric Pouech <epouech(a)codeweavers.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3873
This clears up much of the todo list for mspatcha. GetFilePatchSignature* and NormalizeFileForPatchSignature have now been implemented in these changes.
These changes bring better support for things like the Adobe Acrobat installer without the need for things like the winetricks mspatcha.dll native dll override. Still needed is support for interleaved streams in the LZXD decompression logic, however this is a great start to better supporting software installers that use the Windows interface for creating and applying patches to files.
--
v2: mspatcha: Add support for 32-bit file image patch transforms
mspatcha: Add implementations for GetFilePatchSignature* routines
mspatcha: Add support for 32-bit file normalizing
https://gitlab.winehq.org/wine/wine/-/merge_requests/3870
This clears up much of the todo list for mspatcha. GetFilePatchSignature* and NormalizeFileForPatchSignature have now been implemented in these changes.
These changes bring better support for things like the Adobe Acrobat installer without the need for things like the winetricks mspatcha.dll native dll override. Still needed is support for interleaved streams in the LZXD decompression logic, however this is a great start to better supporting software installers that use the Windows interface for creating and applying patches to files.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3870
--
v2: dmime: Pass the DMUS_PMSG through the performance graph.
dmime: Rename DMUS_PMSGToItem to impl_from_DMUS_PMSG.
dmime: Remove unnecessary struct message members.
dmime: Use a struct list to keep performance messages.
dmime: Get rid of the DMUS_PMSGItem typedef.
dmime: Convert DMUS_PMSG music and reference times in SendPMsg.
dmime/tests: Test that SendPMsg also converts reference time.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3851
The memory is completely overwritten a few lines later, so there is no
reason to preserve its original contents. Furthermore, _recalloc will
not be available if this DLL switches from ucrtbase to msvcrt, and the
code as written would leak memory if _recalloc failed.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3869
For now, assume all Unicode codepoints in range U+0100 - U+10FFFF
constitute a valid identifier. Note that we already do that for range
U+0080 - U+00FF.
--
v3: wbemprox: Fix out-of-bounds access caused by codepoints above U+00FF.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1170
I wrote this patch some time ago, and I'm not really sure why I did. I don't
think it was necessary for any refactoring.
Looking at it again, though, I think it does make sense. Device validation is a
high-level operation, and I think it's clearer if we're checking the d3d states
directly here. This also means we're not unnecessarily applying the stateblock
here.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3864
Make functions ntlea needs to patch hotpatchable. And add a asm wrapper for `GetWindowLongA` to workaround an assumption ntlea made.
--
v2: user32: add hotpatchable wrapper for GetWindowLongA
https://gitlab.winehq.org/wine/wine/-/merge_requests/3855
This patch-set adds the definitions and struct modifications required to eventually implement `FileRenameInformationEx` and `FileLinkInformationEx`.
The initial tests are copies of the tests for `FileRenameInformation` and `FileLinkInformation`, but with the `ReplaceIfExists` field replaced with the equivalient `Flag` value: `FILE_RENAME_REPLACE_IF_EXISTS` or `FILE_LINK_REPLACE_IF_EXISTS` respectively.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3836
--
v2: cryptui: Use CertNameToStr(CERT_NAME_STR_NO_QUOTING_FLAG) to disable quoting.
crypt32: Add support for CERT_NAME_STR_NO_QUOTING_FLAG to CertNameToStr().
crypt32/tests: Add some tests for quoted RDN values.
crypt32: Avoid truncating unicode chars.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3729
It can be unnecessary at best and unsupported at worst (e.g. no ARB_texture_multisample).
--
v4: wined3d: Don't skip ARB fragment program selection when fog state is dirty.
wined3d: Skip acquiring a context for an offscreen resource in texture2d_read_from_framebuffer().
wined3d: Don't force going through a texture when downloading from renderbuffers.
wined3d: Handle depth textures in texture2d_read_from_framebuffer().
wined3d: Rename wined3d_context_gl_apply_fbo_state_blit() function.
wined3d: Don't setup FBO and draw buffers in wined3d_context_gl_apply_blit_state().
wined3d: Don't call wined3d_texture_load() from wined3d_context_gl_apply_blit_state().
wined3d: Don't bind the FBO to GL_READ_FRAMEBUFFER in wined3d_context_gl_apply_blit_state().
wined3d: Prepare/load the destination resource location in arbfp_blitter_blit().
wined3d: Prepare/load the destination resource location in ffp_blitter_blit().
wined3d: Don't call wined3d_context_gl_apply_blit_state() from texture2d_read_from_framebuffer().
https://gitlab.winehq.org/wine/wine/-/merge_requests/3211