Commit graph

165516 commits

Author SHA1 Message Date
Brendan Shanks
4e6dbf3b9e loader: In macOS preloader, add __program_vars section.
This is needed to be a correct macOS 10.7 binary.
2023-07-18 15:16:12 +02:00
Brendan Shanks
cfa0dd9dd9 loader: On 64-bit macOS, reserve the low 8GB using a zerofill section.
A zerofill section is the only way to reserve address space and prevent
system frameworks from using it, including preventing allocations
before any preloader code runs:
- starting with Ventura, dyld allocates private memory from 0x1000-0x81000.
  This breaks EXEs that have an image base of 0x10000.
- Rosetta allocates memory starting at 0x100000000, which breaks EXEs based there.
- starting with Monterey, for proper 10.7 binaries (which include a __program_vars section),
  libSystem initializes itself before the preloader runs. This fragments the <4GB
  address space which is needed for Wow64.

This will need to be adjusted if any EXEs based at 0x200000000 or higher
are found.
2023-07-18 15:16:12 +02:00
Brendan Shanks
0920543876 configure: Only attempt to build macOS preloader on Intel, and remove unnecessary flag checks. 2023-07-18 15:16:12 +02:00
Brendan Shanks
c1958ddc7a ntdll: Don't release address space on 64-bit macOS. 2023-07-18 15:15:24 +02:00
Biswapriyo Nath
900dfca389 include: Add more CLSIDs in d2d1effects.idl. 2023-07-17 23:31:23 +02:00
Jeff Smith
a55c89dba6 gdiplus/tests: Fix mangled test output when dumping data in hex format. 2023-07-17 21:58:57 +02:00
Jacek Caban
36384097c7 win32u: Pass module name before packed lparam in win_hook_params. 2023-07-17 18:11:19 +02:00
Jacek Caban
730d462b7f user32: Always use NtCallbackReturn to pass result from User32CallWindowsHook. 2023-07-17 18:11:19 +02:00
Jacek Caban
8f168ea69b wow64win: Convert parameters in place in wow64_NtUserCallWindowsHook. 2023-07-17 18:11:19 +02:00
Jacek Caban
2149bdfda7 wow64win: Convert parameters in place in wow64_NtUserCallWinProc. 2023-07-17 18:11:19 +02:00
Jacek Caban
e1ff3c8d22 wow64win: Support in place conversion in 64to32 struct conversion helpers. 2023-07-17 18:11:19 +02:00
Jacek Caban
3b9580a3c7 wow64win: Define more 32-bit types. 2023-07-17 18:11:19 +02:00
Zhao Yi
ff951dc843 comctl32/syslink: Check item type before increasing link ID in SYSLINK_LinkAtPt().
Signed-off-by: Zhaoyi <zhaoyi@uniontech.com>
2023-07-17 15:19:38 +02:00
Zhao Yi
53fd667eeb comctl32/tests: Add a test case to get syslinkid.
Signed-off-by: Zhaoyi <zhaoyi@uniontech.com>
2023-07-17 15:19:17 +02:00
Shaun Ren
327667a620 sapi/tests: Fix ISpObjectToken::CreateInstance E_ACCESSDENIED error. 2023-07-17 15:17:36 +02:00
Shaun Ren
bc479f2a19 sapi/tests: Fix intermittent duration test failure in mmaudio. 2023-07-17 15:17:36 +02:00
Shaun Ren
9941a71649 sapi: Invoke AddRef in ISpVoice::SetVoice. 2023-07-17 15:17:36 +02:00
Shaun Ren
5fccc408c6 sapi: Invoke AddRef in mmaudio SetObjectToken. 2023-07-17 15:17:36 +02:00
Jacob Czekalla
186d949703 comdlg32: Add parent folder button to IFileDialog. 2023-07-17 12:14:04 +02:00
Alexandre Julliard
12869e46bd winex11.drv: Use nameless unions/structs. 2023-07-17 11:39:50 +02:00
Alexandre Julliard
bb9030cb78 winemac.drv: Use nameless unions/structs. 2023-07-17 11:39:50 +02:00
Alexandre Julliard
744237ecf6 wineandroid.drv: Use nameless unions/structs. 2023-07-17 11:39:50 +02:00
Alexandre Julliard
e8f82d4d15 wined3d: Use nameless unions/structs. 2023-07-17 11:35:05 +02:00
Alexandre Julliard
d75127d41a wevtapi: Use nameless unions/structs. 2023-07-17 11:34:29 +02:00
Alexandre Julliard
8a2dca2563 wbemprox: Use nameless unions/structs. 2023-07-17 11:34:13 +02:00
Alexandre Julliard
57bfaa7514 usbd.sys: Use nameless unions/structs. 2023-07-17 11:33:54 +02:00
Alexandre Julliard
72ee10b5d5 sane.ds: Use nameless unions/structs. 2023-07-17 11:33:39 +02:00
Alexandre Julliard
fe8d66bf49 quartz: Use nameless unions/structs. 2023-07-17 11:33:22 +02:00
Alexandre Julliard
7dc37b2a09 prntvpt: Use nameless unions/structs. 2023-07-17 11:32:46 +02:00
Alexandre Julliard
1fba1185e4 pdh: Use nameless unions/structs. 2023-07-17 11:32:27 +02:00
Victor Chiletto
fb296929f9 user32: Add hotpatch prologue to RegisterRawInputDevices.
re4_tweaks relies on this function being hotpatchable [1].

[1]: 7cfcf5c427/dllmain/input.cpp (L903)
2023-07-17 11:26:29 +02:00
Jinoh Kang
9de7c79153 winegcc: Enable SafeSEH only on i386.
SafeSEH is not applicable to architectures other than i386.

This fixes compiling with the clang ARM assembler, which cannot parse
".def @feat.00" since "@" is parsed as the start of a line comment.
2023-07-17 11:11:48 +02:00
Jinoh Kang
057467bff9 ntdll: Fix restoring X16 and X17 in ARM64 syscall dispatcher.
Today, NtContinue() on ARM64 does not restore X16 and X17 from the
context.

This is because the values for X16 and X17 are overwritten when the
current thread returns to the "user mode" (PE side) via
__wine_syscall_dispatcher, which in turn uses them as scratch registers
for restoring SP and PC respectively.

We cannot avoid using scratch registers when restoring SP and PC.  This
is because ARMv8 does not have an unprivileged (EL0) instruction that
loads SP and PC from memory or non-GPR architectural state.

Fix this by making ARM64 __wine_syscall_dispatcher perform a full
context restore via raise(SIGUSR2) when NtContinue() is used.

Since raising a signal is quite expensive, it should be done only when
necessary. To achieve this, split the ARM64 syscall dispatcher's
returning behaviour into a fast path (that does not involve signals) and
a slow path (that involves signals):

- If CONTEXT_INTEGER is not set, the dispatcher takes the fast path:
  the X16 and X17 registers are clobbered as usual.

- If X16 == PC and X17 == SP, the dispatcher also takes the fast path:
  it can safely use X16 and X17 without corrupting the register values,
  since those two registers already have the desired values.

  This fast path is used in call_user_apc_dispatcher(),
  call_user_exception_dispatcher(), and call_init_thunk().

- Otherwise, the dispatcher takes the slow path: it raises SIGUSR2 and
  does full context restore in the signal handler.

Fixes: 88e336214d
2023-07-17 11:11:44 +02:00
Nikolay Sivov
24557a257a d3dcompiler/tests: Add another test for matrix majority flags.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-07-17 09:40:34 +02:00
Alistair Leslie-Hughes
92f52d1eb4 gdiplus: Remove DECLSPEC_HIDDEN usage. 2023-07-17 09:40:20 +02:00
Alistair Leslie-Hughes
19c5016095 twain_32: Remove DECLSPEC_HIDDEN usage. 2023-07-17 09:40:20 +02:00
Bernhard Kölbl
91a84cff95 mfmediaengine: Add support for inserting audio effects. 2023-07-17 09:40:01 +02:00
Bernhard Kölbl
096b46cf8d mfmediaengine/tests: Add tests for audio effects. 2023-07-17 09:39:58 +02:00
Tim Clem
2238658e2f wmp: Release filter graph and interfaces if WMPControls::play fails. 2023-07-14 21:35:52 +02:00
Tim Clem
424994c933 wmp: Don't release a NULL typelib. 2023-07-14 21:35:52 +02:00
Tim Clem
710eec8fac shell32: Don't fall back to $HOME for missing user special folders.
Fall through in create_link and allow SHGetFolderPathAndSubDirW to
create an empty folder in place if the alternatives are not available.

Creating a link back to $HOME makes a recursive directory structure,
which results in crashes in programs that naively search %USERPROFILE%
(e.g. Quicken).
2023-07-14 20:32:39 +02:00
Biswapriyo Nath
788a61222c include: Add ID2D1DeviceContext4 in d2d1_3.idl. 2023-07-14 20:31:43 +02:00
Biswapriyo Nath
a66504de8f include: Add ID2D1DeviceContext3 in d2d1_3.idl. 2023-07-14 20:31:42 +02:00
Biswapriyo Nath
de1d097d29 include: Add ID2D1SvgGlyphStyle in d2d1_3.idl. 2023-07-14 20:31:41 +02:00
Biswapriyo Nath
70eb577f3e include: Add ID2D1SpriteBatch in d2d1_3.idl. 2023-07-14 20:31:39 +02:00
Zebediah Figura
166186ba46 wined3d: Move the wined3d_vk.h include to individual files. 2023-07-14 18:28:17 +02:00
Zebediah Figura
49e437a0c0 wined3d: Move vk_aspect_mask_from_format() functions to wined3d_vk.h. 2023-07-14 18:28:17 +02:00
Zebediah Figura
e4e7c9b23f wined3d: Move remaining wined3d_context_vk functions to wined3d_vk.h. 2023-07-14 18:28:17 +02:00
Zebediah Figura
e7de5a45a9 wined3d: Move struct wined3d_format_vk to wined3d_vk.h. 2023-07-14 18:28:17 +02:00
Zebediah Figura
85869cb78c wined3d: Move struct wined3d_swapchain_vk to wined3d_vk.h. 2023-07-14 18:28:17 +02:00