Commit graph

160014 commits

Author SHA1 Message Date
Alexandre Julliard 25735da0de makedep: Make the extra C flags architecture-generic. 2022-10-24 16:19:47 +02:00
Alexandre Julliard 815e766d9d makedep: Make the delay load flags architecture-generic. 2022-10-24 16:19:47 +02:00
Alexandre Julliard 55e2335f64 makedep: Make the debug flags architecture-generic. 2022-10-24 16:19:47 +02:00
Alexandre Julliard afc286fb51 makedep: Make the target flags architecture-generic. 2022-10-24 16:19:47 +02:00
Alexandre Julliard 24d791e2e9 makedep: Pass a generic architecture value instead of the is_cross flag to various helpers. 2022-10-24 16:19:47 +02:00
Paul Gofman 6d9dd6e488 winmm: Use a global timeout for refreshing joystick devices. 2022-10-24 11:18:45 +02:00
Alex Henrie d6facdc0b8 shell32: Remove unused function strdupW. 2022-10-24 11:18:37 +02:00
Alex Henrie 0a66cfa9a2 shell32: Don't use strdupW or heap_* functions in shelllink.c. 2022-10-24 11:18:37 +02:00
Alex Henrie e3a74a9178 shell32: Don't use strdupW or heap_* functions in shelldispatch.c. 2022-10-24 11:18:37 +02:00
Alex Henrie e8aba9c412 shell32: Don't use strdupW or heap_* functions in shellole.c. 2022-10-24 11:18:37 +02:00
Jinoh Kang 72c0c88f2a gdiplus: Replace GpImage's busy flag with SRWLOCK.
Today, the image_unlock() helper function has a data race due to
non-atomic write to GpImage's 'busy' flag which is accessible by other
threads.  Also, it lacks a release fence, which means that other threads
can observe the unlocked (busy = 0) state too early when the current
thread unlocks the image; specifically, the write to the 'busy' field of
the GpImage can be reordered before the last read/write to any other
fields of the same GpImage.

Fix this by replacing the 'busy' field of GpImage with SRWLOCK.
2022-10-24 11:17:39 +02:00
Jinoh Kang 7abca9742a gdiplus: Avoid copying GpImage's busy flag in select_frame_wic().
The 'busy' field in GpImage is used as an atomic variable.  The C11
standard (§5.1.2.4, paragraph 25) states that two conflicting actions to
a memory location shall be both atomic operations, or otherwise properly
synchronized; otherwise, it constitutes a data race.

However, select_frame_wic() performs a non-atomic access to the 'busy'
field on a GpImage that is potentially accessible by other threads.
This happens when select_frame_wic() copies new_image to the old image
object.  Although it does attempt to preserve the value of the 'busy'
field by setting new_image->busy = image->busy first, thereby
effectively assigning an identical value to the field, it is unclear
that this does not actually constitute a theoretical, if not practical,
data race.  This also prevents replacing the busy flag with a mutex or
other synchronization primitives.

Therefore, skip the 'busy' field when copying fields from the new image
to the original image object.
2022-10-24 11:17:37 +02:00
Jinoh Kang d6b4321125 gdiplus: Avoid recursively locking image in GdipImageRotateFlip.
GdipImageRotateFlip() calls GdipBitmapLockBits() while holding the image
lock, resulting in a recursive lock.

Since GdipImageRotateFlip() uses GdipBitmapLockBits() only to obtain
Scan0 and Stride, replace them with equivalent fields from GpBitmap
itself.
2022-10-24 11:17:35 +02:00
Esme Povirk 8e73b48f34 win32u: Reject invalid length in SetWindowPlacement. 2022-10-24 11:16:06 +02:00
Esme Povirk f91eb0a9e0 user32: Test Get/SetWindowPlacement with invalid length. 2022-10-24 11:16:06 +02:00
Paul Gofman c698ba86d4 msvcrt: Display message box in abort() for specific CRT versions only. 2022-10-24 11:13:39 +02:00
Piotr Caban f943d44972 msvcrt: Fix _wputenv_s invalid argument handling. 2022-10-24 11:13:18 +02:00
Mihail Ivanchev 10e7c824e0 include: Add prototype for ReOpenFile().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53821
2022-10-24 11:13:06 +02:00
Anton Baskanov 359b4efce8 quartz/tests: Add tests for querying MPEG layer-3 decoder pin info.
Signed-off-by: Anton Baskanov <baskanov@gmail.com>
2022-10-24 11:12:35 +02:00
Anton Baskanov 86a998e8e9 quartz/tests: Add tests for IBaseFilter_FindPin() on MPEG layer-3 decoder.
Signed-off-by: Anton Baskanov <baskanov@gmail.com>
2022-10-24 11:12:35 +02:00
Anton Baskanov 83c2e0db27 quartz/tests: Add tests for IBaseFilter_EnumPins() on MPEG layer-3 decoder.
Signed-off-by: Anton Baskanov <baskanov@gmail.com>
2022-10-24 11:12:35 +02:00
Anton Baskanov c7d82489ae quartz/tests: Test MPEG layer-3 decoder unconnected filter state.
Signed-off-by: Anton Baskanov <baskanov@gmail.com>
2022-10-24 11:12:35 +02:00
Anton Baskanov ff9ef4efd4 quartz/tests: Add tests for MPEG layer-3 decoder aggregation.
Signed-off-by: Anton Baskanov <baskanov@gmail.com>
2022-10-24 11:12:35 +02:00
Anton Baskanov 773dea79b9 quartz/tests: Add tests for MPEG layer-3 decoder interfaces.
Signed-off-by: Anton Baskanov <baskanov@gmail.com>
2022-10-24 11:12:34 +02:00
Paul Gofman 5f42c9e39d wbemprox: Fix string length in get_value_bstr(). 2022-10-24 11:12:09 +02:00
Connor McAdams 329664392e uiautomationcore: Implement UiaRegisterProviderCallback.
Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
2022-10-21 23:33:35 +02:00
Connor McAdams 59589e1196 uiautomationcore/tests: Ignore UIA_NativeWindowHandlePropertyId in certain tests.
Windows versions 10v1507 and below classify a provider as an HWND
provider if it returns a value for UIA_NativeWindowHandle. By ignoring
this property, we get more consistent behavior in tests between all
Windows versions.

Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
2022-10-21 23:33:33 +02:00
Hans Leidekker d393709fe4 crypt32: Parse OCSP responder name.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53813
2022-10-21 23:18:11 +02:00
Eric Pouech 363f1f49a8 dbghelp: Realloc array of buckets inside struct vector.
Instead of silently leaking no longer used chunks.
Be more robust to OOM conditions.
Introducing pool_realloc().

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2022-10-21 23:18:06 +02:00
Eric Pouech c5f4874e7b dbghelp: Use heap functions for allocation.
Create a dedicated heap for each module (as it was done for the
private home grown pools).

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2022-10-21 23:18:06 +02:00
Piotr Caban f0e6447b7f msvcrt: Fix _wputenv_s return value on error. 2022-10-21 23:18:06 +02:00
Piotr Caban 53acb6e736 msvcrt: Fix _putenv_s return value on error. 2022-10-21 23:18:05 +02:00
Brendan Shanks 8f6b8e97c2 sechost: Set the name of internal threads. 2022-10-21 23:18:05 +02:00
Zebediah Figura 0c848768c1 ntdll: Fill the IOSB in sock_transmit() only inside the "if (alerted)" block.
We can only get a successful status that way. This matches sock_recv().

Also combine the if (alerted) blocks. Unlike the previous commits, this cannot
be separated, as it causes warnings with some versions of gcc.
2022-10-21 17:05:13 +02:00
Zebediah Figura 8bf295fd1a ntdll: Combine the "if (alerted)" blocks in sock_send().
There is no need to release the async_fileio structure before calling set_async_direct_result().
2022-10-21 17:05:13 +02:00
Zebediah Figura d3c8842a6e ntdll: Fill the IOSB in sock_send() only inside the "if (alerted)" block.
We can only get a successful status that way. This matches sock_recv().
2022-10-21 17:05:13 +02:00
Zebediah Figura 3905af7c44 ntdll: Combine the "if (alerted)" blocks in sock_recv().
There is no need to release the async_fileio structure before calling set_async_direct_result().
2022-10-21 17:05:13 +02:00
Zebediah Figura f994e0a653 ntdll: Fill the IOSB in sock_recv() only inside the "if (alerted)" block.
We can only get a successful status that way. This avoids an uninitialized variable warning with gcc 12.2.
2022-10-21 17:05:13 +02:00
Zebediah Figura 6b16ead607 ntdll: The async handle passed to set_async_direct_result() cannot be NULL. 2022-10-21 17:05:13 +02:00
Zebediah Figura da8defe5df ws2_32/tests: Add more tests for iosb contents while a recv is pending. 2022-10-21 17:03:24 +02:00
Jinoh Kang 25b05840d4 win32u: Fix data race in NtUserGetProcessDpiAwarenessContext. 2022-10-20 20:58:49 +02:00
Francois Gouget c2adce37f4 ddraw/tests: Mark tests failing randomly on Windows 8 as flaky.
Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=53134
2022-10-20 20:58:33 +02:00
Francois Gouget a00a64b9c0 msdasql: Fix a typo in the is_fixed_length() function name. 2022-10-20 20:58:06 +02:00
Francois Gouget e7be6ae2f1 rpcrt4/tests: Fix the spelling of a couple of comments. 2022-10-20 20:58:06 +02:00
Francois Gouget 0eb40cdbd0 dbghelp: Fix the spelling of a couple of comments. 2022-10-20 20:58:06 +02:00
Francois Gouget 5f0b7390e9 d3d10core/tests: Fix the spelling of a comment. 2022-10-20 20:58:06 +02:00
Francois Gouget 5bd74d0e58 dbghelp: Fix the trailing linefeed of a WARN() message. 2022-10-20 20:58:06 +02:00
Brendan Shanks 480da372b2 xinput1_3: Set thread name for hid_update_thread_proc. 2022-10-20 20:57:28 +02:00
Zhiyi Zhang 4277b47f3e comctl32/tests: Use a toolbar with TBSTYLE_FLAT in toolbar visual tests.
Fix a test failure when theming is off. A toolbar without TBSTYLE_FLAT will fill its checked button
background rectangle when theming is inactive, overwriting the checked pattern required for the test.
2022-10-20 20:57:19 +02:00
Eric Pouech c28a749f66 ntdll/tests: Force alignment of output structures.
Some Windows version expect output to be aligned on 4 bytes.

Notes (from i386 and x86_64 tests):
- MSVC and Mingw/gcc don't layout the two variables (sdki, sdki_ex)
  the same way.
- MSVC aligns each variable on 4-byte boundary,
- MingW/GCC stores them in a 8-byte chunk, but starting from the
  end of the buffer: hence none of them is on a 4-byte boundary.

So, fixing the alignment of variables is not sufficient to
workaround the compilers' discrepancy on all source code.

I didn't find a generic way to align on 4 bytes structures of size
smaller than 4 bytes (apart from adding the DECLSPEC_ALIGN to
each of the offending structures, likely not that many though).
Ideas welcomed.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53684
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2022-10-20 18:30:32 +02:00