This fixes a stack overflow in Helicon Focus 8.2.0,
which was introduced by b5cbb556.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57293
I'm unsure if this is actually the proper way to approach this problem, since an application being so close to a stack overflow that an allocation of wchar_t[MAX_PATH] (=260*2 bytes) is making the difference between crashing and not crashing might be an issue in itself.
However, the crash was introduced by adding this allocation (or rather, changing the condition for it to happen) in previous commit, so for now I think the proper solution would be to move it to the heap instead.
--
v2: comdlg32: Allocate extbuf on heap rather than stack.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6650
This fixes a stack overflow in Helicon Focus 8.2.0,
which was introduced by b5cbb556.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57293
I'm unsure if this is actually the proper way to approach this problem, since an application being so close to a stack overflow that an allocation of wchar_t[MAX_PATH] (=260*2 bytes) is making the difference between crashing and not crashing might be an issue in itself.
However, the crash was introduced by adding this allocation (or rather, changing the condition for it to happen) in previous commit, so for now I think the proper solution would be to move it to the heap instead.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6650
--
v4: jscript: Allow ES5 keywords as identifiers in expressions.
jscript: Allow ES5 keywords as identifiers in labelled statements.
jscript: Allow ES5 keywords as identifiers in function parameter lists.
jscript: Allow ES5 keywords as identifiers in function expressions.
jscript: Allow ES5 keywords as identifiers in catch statements.
jscript: Allow ES5 keywords as identifiers in variable declarations.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6618
Making all the windows handled by the driver to be either GL/VK client surfaces, or top-level windows. This avoids leaking host windows into the Win32 space, and makes it possible to get rid of some remaining NtUserMapWindowPoints in `map_event_coords` for mouse input.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6649
This is based on top of !6526, will mark ready after !6526 is merged.
--
v2: propsys: Support converting to BSTR for PropVariantToVariant.
propsys: Fix a crash in tracing for VariantToPropVariant.
propsys: Implement PropVariantToBSTR.
propsys: Use msvcrt wide string functions.
propsys/tests: Test truncating for PropVariantToString.
propsys/tests: Test PropVariantToBSTR.
propsys: Add PropVariantToBSTR stub.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6640
--
v4: shlwapi: Use printf implementation from ntdll.
ntdll: Make 'h' take precedence over 'l' in pf_vsnprintf().
ntdll: Make 'l' modifier also affect char wideness.
ntdll: Output unrecognized format symbol in pf_vsnprintf().
ntdll: Fix passing char argument to pf_handle_string_format().
ntdll/tests: Add more tests for printf format.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6639
The EnumAddressTypes tests wasn't actually calling the enum function.
The code within the test_EnumAddressTypes function appear to be
setup for calling EnumAddresses, so added a test for this scenario as well.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6646
--
v3: jscript: Allow ES5 keywords as identifiers in expressions.
jscript: Allow ES5 keywords as identifiers in labelled statements.
jscript: Allow ES5 keywords as identifiers in function parameter lists.
jscript: Allow ES5 keywords as identifiers in function expressions.
jscript: Allow ES5 keywords as identifiers in catch statements.
jscript: Allow ES5 keywords as identifiers in variable declarations.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6618
This MR is the first of at least three MRs adding support for the Bluetooth stack API in Wine:
1. The winebth.sys driver, which talks to BlueZ and implements several key IOCTLs for communicating with Bluetooth devices and radios.
2. A bthserv service, which is responsible for keeping track of the authentication agent, and relaying authentication requests and responses to and from the driver.
3. Userspace APIs (bluetoothapis.dll, bthprops.cpl, Windows.Devices.Bluetooth, etc).
winebth.sys is split into two "sub" drivers:
`winebth.sys`: The main entrypoint, loaded by winedevice. It listens for changes to Bluetooth devices and radios and authentication events on BlueZ, passing them on the bthenum. It also handles most IOCTL operations on Bluetooth radio PDOs.
`bthenum`: Responsible for creating nodes for discovered Bluetooth devices and associated services. It also tries to validate any IOCTLs relating to bluetooth devices before passing them to winebth.sys.
The unix code is split between dbus.c, unixlib.c and winebluetooth.c, where winebluetooth is a simple wrapper around unixlib for the sake of organization.
--
v10: dlls/winebth.sys: Implement IOCTL command IOCTL_BTH_DISCONNECT_DEVICE.
dlls/winebth.sys: Add support for RequestAuthorization requests from BlueZ.
dlls/winebth.sys: Add support for RequestPasskey requests from BlueZ.
dlls/winebth.sys: Add support for DisplayPasskey requests from BlueZ.
dlls/winebth.sys: Add support for AuthorizeService requests from BlueZ.
dlls/winebth.sys: Add support for DisplayPinCode requests from BlueZ.
dlls/winebth.sys: Add support for RequestPinCode requests from BlueZ.
dlls/winebth.sys: Add support for RequestConfirmation requests from BlueZ.
dlls/winebth.sys: Implement IOCTL_WINEBTH_SEND_AUTH_RESPONSE.
dlls/winebth.sys: Add IOCTLs IOCTL_WINEBTH_START_AUTH_AGENT and IOCTL_WINEBTH_STOP_AUTH_AGENT.
dlls/winebth.sys: Add support for BLUETOOTH_RADIO_IN_RANGE events (WM_DEVICECHANGE).
dlls/winebth.sys: Implement IOCTL commands IOCTL_WINEBTH_RADIO_SET_FLAG and IOCTL_WINEBTH_RADIO_UNSET_FLAG.
dlls/winebth.sys: Implement IOCTL commands IOCTL_WINEBTH_RADIO_START_DISCOVERY and IOCTL_WINEBTH_RADIO_STOP_DISCOVERY.
dlls/winebth.sys: Implement IOCTL_BTH_GET_LOCAL_INFO for radio devices.
dlls/winebth.sys: Create PDOs for Bluetooth services discovered on remote devices.
dlls/winebth.sys: Implement IOCTL_BTH_GET_DEVICE_INFO.
dlls/winebth.sys: Update device PDO properties on receiving PropertiesChanged for an org.bluez.Device1 object.
dlls/winebth.sys: Set device PDO properties from the device's corresponding org.bluez.Device1 object properties.
dlls/winebth.sys: Remove the corresponding device PDO on receiving InterfacesRemoved for an org.bluez.Device1 object.
dlls/winebth.sys: Create PDOs for newly discovered org.bluez.Device1 objects.
dlls/winebth.sys: Update radio PDO properties on receiving PropertiesChanged for an org.bluez.Adapter1 object.
dlls/winebth.sys: Remove the corresponding radio PDO on receiving InterfacesRemoved for a org.bluez.Adapter1 object.
dlls/winebth.sys: Create new radio PDOs on receiving InterfacesAdded for objects that implement org.bluez.Adapter1.
dlls/winebth.sys: Set radio PDO properties from the device's corresponding org.bluez.Adapter1 object properties.
dlls/winebth.sys: Register and enable BTHPORT_DEVICE and BLUETOOTH_RADIO interfaces for radio PDOs.
dlls/winebth.sys: Derive a unique hardware ID for radio PDOs from their corresponding BlueZ object path.
dlls/winebth.sys: Create radio PDOs from the list of org.bluez.Adapter1 objects on BlueZ.
dlls/winebth.sys: Add a basic unixlib stub using DBus.
dlls/winebth.sys: Add base winebth.sys driver.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6621
--
v4: win32u: Support QDC_VIRTUAL_MODE_AWARE in NtUserQueryDisplayConfig().
win32u: Support QDC_VIRTUAL_MODE_AWARE in NtUserGetDisplayConfigBufferSizes().
user32/tests: Add tests for QueryDisplayConfig( QDC_VIRTUAL_MODE_AWARE ).
https://gitlab.winehq.org/wine/wine/-/merge_requests/6603
On Wed Oct 9 18:35:19 2024 +0000, Matteo Bruni wrote:
> Maybe also check that the other masks are 0? Ideally this should be tested.
Good point, I hadn't considered this to be an issue. I have a patch written for detecting format by memcmp'ing a constant structure against the passed in file's pixel format structure. After writing some tests, it looks like there are certain fields that are ignored in the `struct dds_pixel_format` depending on what the flags field is set to, e.g if it's `DDS_PF_RGB` the `fourcc` field can be set to anything and it's ignored.
I will add some tests for this in my next MR. :)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6636#note_84554
This MR is the first of at least three MRs adding support for the Bluetooth stack API in Wine:
1. The winebth.sys driver, which talks to BlueZ and implements several key IOCTLs for communicating with Bluetooth devices and radios.
2. A bthserv service, which is responsible for keeping track of the authentication agent, and relaying authentication requests and responses to and from the driver.
3. Userspace APIs (bluetoothapis.dll, bthprops.cpl, Windows.Devices.Bluetooth, etc).
winebth.sys is split into two "sub" drivers:
`winebth.sys`: The main entrypoint, loaded by winedevice. It listens for changes to Bluetooth devices and radios and authentication events on BlueZ, passing them on the bthenum. It also handles most IOCTL operations on Bluetooth radio PDOs.
`bthenum`: Responsible for creating nodes for discovered Bluetooth devices and associated services. It also tries to validate any IOCTLs relating to bluetooth devices before passing them to winebth.sys.
The unix code is split between dbus.c, unixlib.c and winebluetooth.c, where winebluetooth is a simple wrapper around unixlib for the sake of organization.
--
v9: dlls/winebth.sys: Implement IOCTL command IOCTL_BTH_DISCONNECT_DEVICE.
dlls/winebth.sys: Add support for RequestAuthorization requests from BlueZ.
dlls/winebth.sys: Add support for RequestPasskey requests from BlueZ.
dlls/winebth.sys: Add support for DisplayPasskey requests from BlueZ.
dlls/winebth.sys: Add support for AuthorizeService requests from BlueZ.
dlls/winebth.sys: Add support for DisplayPinCode requests from BlueZ.
dlls/winebth.sys: Add support for RequestPinCode requests from BlueZ.
dlls/winebth.sys: Add support for RequestConfirmation requests from BlueZ.
dlls/winebth.sys: Implement IOCTL_WINEBTH_SEND_AUTH_RESPONSE.
dlls/winebth.sys: Add IOCTLs IOCTL_WINEBTH_START_AUTH_AGENT and IOCTL_WINEBTH_STOP_AUTH_AGENT.
dlls/winebth.sys: Add support for BLUETOOTH_RADIO_IN_RANGE events (WM_DEVICECHANGE).
dlls/winebth.sys: Implement IOCTL commands IOCTL_WINEBTH_RADIO_SET_FLAG and IOCTL_WINEBTH_RADIO_UNSET_FLAG.
dlls/winebth.sys: Implement IOCTL commands IOCTL_WINEBTH_RADIO_START_DISCOVERY and IOCTL_WINEBTH_RADIO_STOP_DISCOVERY.
dlls/winebth.sys: Implement IOCTL_BTH_GET_LOCAL_INFO for radio devices.
dlls/winebth.sys: Create PDOs for Bluetooth services discovered on remote devices.
dlls/winebth.sys: Dispatch a BLUETOOTH_WATCHER_EVENT_TYPE_DEVICE_PROPERTIES_CHANGED event on receiving InterfacesAdded for a BlueZ device.
dlls/winebth.sys: Implement IOCTL_BTH_GET_DEVICE_INFO.
dlls/winebth.sys: Update radio PDO properties when BlueZ sends us a PropertiesChanged for an adapter.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6621
This MR is the first of at least three MRs adding support for the Bluetooth stack API in Wine:
1. The winebth.sys driver, which talks to BlueZ and implements several key IOCTLs for communicating with Bluetooth devices and radios.
2. A bthserv service, which is responsible for keeping track of the authentication agent, and relaying authentication requests and responses to and from the driver.
3. Userspace APIs (bluetoothapis.dll, bthprops.cpl, Windows.Devices.Bluetooth, etc).
winebth.sys is split into two "sub" drivers:
`winebth.sys`: The main entrypoint, loaded by winedevice. It listens for changes to Bluetooth devices and radios and authentication events on BlueZ, passing them on the bthenum. It also handles most IOCTL operations on Bluetooth radio PDOs.
`bthenum`: Responsible for creating nodes for discovered Bluetooth devices and associated services. It also tries to validate any IOCTLs relating to bluetooth devices before passing them to winebth.sys.
The unix code is split between dbus.c, unixlib.c and winebluetooth.c, where winebluetooth is a simple wrapper around unixlib for the sake of organization.
--
v8: dlls/winebth.sys: Implement IOCTL command IOCTL_BTH_DISCONNECT_DEVICE.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6621
This MR is the first of at least three MRs adding support for the Bluetooth stack API in Wine:
1. The winebth.sys driver, which talks to BlueZ and implements several key IOCTLs for communicating with Bluetooth devices and radios.
2. A bthserv service, which is responsible for keeping track of the authentication agent, and relaying authentication requests and responses to and from the driver.
3. Userspace APIs (bluetoothapis.dll, bthprops.cpl, Windows.Devices.Bluetooth, etc).
winebth.sys is split into two "sub" drivers:
`winebth.sys`: The main entrypoint, loaded by winedevice. It listens for changes to Bluetooth devices and radios and authentication events on BlueZ, passing them on the bthenum. It also handles most IOCTL operations on Bluetooth radio PDOs.
`bthenum`: Responsible for creating nodes for discovered Bluetooth devices and associated services. It also tries to validate any IOCTLs relating to bluetooth devices before passing them to winebth.sys.
The unix code is split between dbus.c, unixlib.c and winebluetooth.c, where winebluetooth is a simple wrapper around unixlib for the sake of organization.
--
v7: dlls/winebth.sys: Implement IOCTL command IOCTL_BTH_DISCONNECT_DEVICE.
dlls/winebth.sys: Add support for RequestAuthorization requests from BlueZ.
dlls/winebth.sys: Add support for RequestPasskey requests from BlueZ.
dlls/winebth.sys: Add support for DisplayPasskey requests from BlueZ.
dlls/winebth.sys: Add support for AuthorizeService requests from BlueZ.
dlls/winebth.sys: Add support for DisplayPinCode requests from BlueZ.
dlls/winebth.sys: Add support for RequestPinCode requests from BlueZ.
dlls/winebth.sys: Add support for RequestConfirmation requests from BlueZ.
dlls/winebth.sys: Implement IOCTL_WINEBTH_SEND_AUTH_RESPONSE.
dlls/winebth.sys: Add IOCTLs IOCTL_WINEBTH_START_AUTH_AGENT and IOCTL_WINEBTH_STOP_AUTH_AGENT.
dlls/winebth.sys: Add support for BLUETOOTH_RADIO_IN_RANGE events (WM_DEVICECHANGE).
dlls/winebth.sys: Implement IOCTL commands IOCTL_WINEBTH_RADIO_SET_FLAG and IOCTL_WINEBTH_RADIO_UNSET_FLAG.
dlls/winebth.sys: Implement IOCTL commands IOCTL_WINEBTH_RADIO_START_DISCOVERY and IOCTL_WINEBTH_RADIO_STOP_DISCOVERY.
dlls/winebth.sys: Implement IOCTL_BTH_GET_LOCAL_INFO for radio devices.
dlls/winebth.sys: Update radio PDO properties when BlueZ sends us a PropertiesChanged for an adapter.
dlls/winebth.sys: Create PDOs for Bluetooth services discovered on remote devices.
dlls/winebth.sys: Dispatch a BLUETOOTH_WATCHER_EVENT_TYPE_DEVICE_PROPERTIES_CHANGED event on receiving InterfacesAdded for a BlueZ device.
dlls/winebth.sys: Implement IOCTL_BTH_GET_DEVICE_INFO.
dlls/winebth.sys: Set properties for Bluetooth devices PDOs.
dlls/winebth.sys: Remove Bluetooth device PDOs on receiving InterfaceRemoved for a BlueZ device.
dlls/winebth.sys: Create PDOs for newly discovered remote Bluetooth devices.
dlls/winebth.sys: Remove radio PDOs on receiving InterfacesRemoved for a BlueZ adapter.
dlls/winebth.sys: Dispatch a BLUETOOTH_WATCHER_EVENT_TYPE_RADIO_ADDED event on receiving InterfacesAdded for a BlueZ adapter.
dlls/winebth.sys: Add radio device properties from BlueZ.
dlls/winebth.sys: Register and enable BTHPORT_DEVICE and BLUETOOTH_RADIO interfaces for radio PDOs.
dlls/winebth.sys: Derive a unique hardware ID for radio PDOs from their corresponding BlueZ object path.
dlls/winebth.sys: Create PDOs for newly discovered Bluetooth radios.
dlls/winebth.sys: Add base winebth.sys driver.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6621
--
v3: shlwapi: Output unrecognized format symbol in wvnsprintf().
shlwapi: Skip duplicate '#' in WPRINTF_ParseFormat().
shlwapi: Skip some spaces in WPRINTF_ParseFormat().
shlwapi: Handle ll in WPRINTF_ParseFormat().
shlwapi: Fix char width modifiers handling in WPRINTF_ParseFormat().
shlwapi: Handle repeated modifiers in WPRINTF_ParseFormat().
shlwapi/tests: Add some tests for printf format.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6639
This MR contains a couple of changes linked to debugging issues
when loading PDB C++ information.
It contains:
- protection of most of a bunch of strings against Wine internal
trace buffer overflow (C++ symbol and type names can be very
long)
- a couple of additional TRACE
- a couple of fixed for typos
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6642
--
v3: win32u: Support QDC_VIRTUAL_MODE_AWARE in NtUserQueryDisplayConfig().
win32u: Support QDC_VIRTUAL_MODE_AWARE in NtUserGetDisplayConfigBufferSizes().
user32/tests: Add tests for QueryDisplayConfig( QDC_VIRTUAL_MODE_AWARE ).
https://gitlab.winehq.org/wine/wine/-/merge_requests/6603
--
v4: propsys: Initially implement PropVariantToVariant.
propsys: Support converting clsid to string for PropVariant.
propsys/tests: Test converting clsid to string.
propsys/tests: Add tests for PropVariantToVariant.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6526
According to microsoft documentation, GetClientRect, ScrollWindowEx, SetScrollPos and SetScrollRange (among others) may only
be called while the control is in-place active.
This fixes a segmentation fault in Anytone CPS.
--
v5: riched20: Only call ME_SendRequestResize when control is in-place active.
riched20: Exit from editor_ensure_visible when control is not in-place active.
riched20/tests: Test that ScrollWindowEx and GetClientRect are only called when control is in-place active.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6608
--
v2: shlwapi: Output unrecognized format symbol in wvnsprintf().
shlwapi: Skip duplicate '#' in WPRINTF_ParseFormat().
shlwapi: Skip some spaces in WPRINTF_ParseFormat().
shlwapi: Handle ll in WPRINTF_ParseFormat().
shlwapi: Fix char width modifiers handling in WPRINTF_ParseFormat().
shlwapi: Handle repeated modifiers in WPRINTF_ParseFormat().
shlwapi/tests: Add some tests for printf format.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6639
This MR is the first of at least three MRs adding support for the Bluetooth stack API in Wine:
1. The winebth.sys driver, which talks to BlueZ and implements several key IOCTLs for communicating with Bluetooth devices and radios.
2. A bthserv service, which is responsible for keeping track of the authentication agent, and relaying authentication requests and responses to and from the driver.
3. Userspace APIs (bluetoothapis.dll, bthprops.cpl, Windows.Devices.Bluetooth, etc).
winebth.sys is split into two "sub" drivers:
`winebth.sys`: The main entrypoint, loaded by winedevice. It listens for changes to Bluetooth devices and radios and authentication events on BlueZ, passing them on the bthenum. It also handles most IOCTL operations on Bluetooth radio PDOs.
`bthenum`: Responsible for creating nodes for discovered Bluetooth devices and associated services. It also tries to validate any IOCTLs relating to bluetooth devices before passing them to winebth.sys.
The unix code is split between dbus.c, unixlib.c and winebluetooth.c, where winebluetooth is a simple wrapper around unixlib for the sake of organization.
--
v6: dlls/winebth.sys: Add support for RequestAuthorization requests from BlueZ.
dlls/winebth.sys: Add support for RequestPasskey requests from BlueZ.
dlls/winebth.sys: Add support for DisplayPasskey requests from BlueZ.
dlls/winebth.sys: Add support for AuthorizeService requests from BlueZ.
dlls/winebth.sys: Add support for DisplayPinCode requests from BlueZ.
dlls/winebth.sys: Add support for RequestPinCode requests from BlueZ.
dlls/winebth.sys: Add support for RequestConfirmation requests from BlueZ.
dlls/winebth.sys: Implement IOCTL_WINEBTH_SEND_AUTH_RESPONSE.
dlls/winebth.sys: Add IOCTLs IOCTL_WINEBTH_START_AUTH_AGENT and IOCTL_WINEBTH_STOP_AUTH_AGENT.
dlls/winebth.sys: Add support for BLUETOOTH_RADIO_IN_RANGE events (WM_DEVICECHANGE).
dlls/winebth.sys: Implement IOCTL commands IOCTL_WINEBTH_RADIO_SET_FLAG and IOCTL_WINEBTH_RADIO_UNSET_FLAG.
dlls/winebth.sys: Implement IOCTL commands IOCTL_WINEBTH_RADIO_START_DISCOVERY and IOCTL_WINEBTH_RADIO_STOP_DISCOVERY.
dlls/winebth.sys: Implement IOCTL_BTH_GET_LOCAL_INFO for radio devices.
dlls/winebth.sys: Update radio PDO properties when BlueZ sends us a PropertiesChanged for an adapter.
dlls/winebth.sys: Create PDOs for Bluetooth services discovered on remote devices.
dlls/winebth.sys: Create PDOs for newly discovered remote Bluetooth devices.
dlls/winebth.sys: Remove radio PDOs on receiving InterfacesRemoved for a BlueZ adapter.
dlls/winebth.sys: Dispatch a BLUETOOTH_WATCHER_EVENT_TYPE_RADIO_ADDED event on receiving InterfacesAdded for a BlueZ adapter.
dlls/winebth.sys: Add radio device properties from BlueZ.
dlls/winebth.sys: Register and enable BTHPORT_DEVICE and BLUETOOTH_RADIO interfaces for radio PDOs.
dlls/winebth.sys: Derive a unique hardware ID for radio PDOs from their corresponding BlueZ object path.
dlls/winebth.sys: Create PDOs for newly discovered Bluetooth radios.
dlls/winebth.sys: Add base winebth.sys driver.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6621
--
v3: win32u: Introduce a new NtUserSetRawWindowPos call for the drivers.
winex11: Use XTranslateCoordinates to compute relative coordinates.
winex11: Use NtUserSetWindowPos when DPI awareness is unnecessary.
winemac: Use NtUserSetWindowPos when DPI awareness is unnecessary.
winemac: Stop mapping toplevel window rects to parent window.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6613
Same calculation is used in the DefWindowProc() handler. This also fixes handling of region == 1: GetDCEx(hwnd, 1, DCX_INTERSECTRGN) won't work.
Probably same fix is needed for other comctl32 themed controls.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6617
This MR introduces support for [thread safety annotations,](https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#conditi… currently supported by Clang. The feature is similar to `__WINE_MALLOC` attributes, allowing functions, data members and global variables to be optionally annotated with synchronization details.
As a proof of concept, I have annotated `RTL_CRITICAL_SECTION` and `dlls/ntdll`.
Because the feature was designed as a C++ extension first, a bit of stubbing is required to annotate struct fields about what lock they are guarded by. The macros `WINE_DECLARE_LOCK_FIELD_STUB` and `WINE_DEFINE_LOCK_FIELD_STUB` take care of that. For instance, in `dlls/ntdll/threadpool.c`:
```c
WINE_DECLARE_LOCK_FIELD_STUB(threadpool_group, CRITICAL_SECTION, cs);
struct threadpool_group
{
LONG refcount;
BOOL shutdown;
CRITICAL_SECTION cs;
/* list of group members, locked via .cs */
struct list members __WINE_FIELD_GUARDED_BY(threadpool_group, cs);
};
WINE_DEFINE_LOCK_FIELD_STUB(threadpool_group, CRITICAL_SECTION, cs);
```
Clang will therefore warn if `members` is accessed without holding `cs`.
Note that the analyzer does not support conditional locking. For that reason, functions that hold and release a lock conditionally have been marked with `__WINE_NO_THREAD_SAFETY_ANALYSIS` to pre-empt false positives from Clang.
--
v7: dlls/ntoskrnl.exe: Add thread safety annotations.
dlls/combase: Add thread safety annotations.
dlls/imm32: Add GUARDED_BY attribute to the struct ime's refcount field.
dlls/crypt32: Annotate CRYPT_CollectionAdvanceEnum indicating that the caller should hold the collection store's lock.
dlls/amstream/tests: Disable thread safety analysis for testfilter_wait_state.
dlls/winhttp: Add thread safety annotations.
dlls/mmdevapi: Add thread safety annotations for session_lock and sessions_unlock.
dlls/mfplat: Add thread safety annotations.
dlls/msi: Add thread safety annotations for msiobj_lock and msiobj_unlock.
dlls/xaudio2_7: Add thread safety annotations.
dlls/wmvcore: Add thread safety annotations for async_reader_wait_pts, async_reader_deliver_sample, and callback_thread_run.
dlls/wininet: Disable thread safety annotations for HTTPREQ_ReadFile and HTTPREQ_QueryDataAvailable.
dlls/winegstreamer: Add thread safety annotation for GST_Seeking_SetPositions.
dlls/dwrite: Add thread safety annotations for factory_lock and factory_unlock.
dlls/wined3d: Add thread safety annotations.
lib/vkd3d: Build with WINE_NO_THREAD_SAFETY_ANALYSIS defined.
dlls/d2d1: Add thread safety annotations.
dlls/xaudio2_7: Disable thread safety analysis for IXAudio2Impl_CreateSourceVoice.
dlls/xinput1_3: Add thread safety annotations for controller_lock and controller_unlock.
dlls/ucrtbase/tests: Only release &fp.iobuf->_crit if the previous lock was successful (Clang).
dlls/netio.sys: Add thread safety annotations for lock_sock and unlock_socket.
dlls/msvcirt/tests: Release &sb.lock only if the previous lock was successful (Clang).
dlls/wbemprox: Add thread safety annotations.
libs/strmbase: Annotate BaseRenderer_Receive to indicate the caller needs to hold the underlying filter lock.
dlls/rpcrt4: Add thread safety annotations for AllocateContextHandle, FindContextHandle, ReleaseContextHandle.
dlls/wined3d: Add thread safety annotations for allocator locking helpers.
dlls/mfreadwrite: Indicate calling source_reader_read_sample requires holding &reader->cs.
dlls/mapi32: Add thread safety annotations for GetValue, AddValue, Lock, Unlock.
dlls/kernel32/tests: Add thread safety annotations.
dlls/combase: Add thread safety annotations
programs/services: Add thread safety annotations.
dlls/winmm: Add thread safety annotations.
dlls/vcomp: Add thread safety annotations.
dlls/user32: Add thread safety annotations.
dlls/odbc32: Add thread safety annotations.
dlls/krnl386.exe16: Add thread safety annotations.
dlls/msvcirt: Add thread safety annotations.
dlls/msvcp90: Add thread safety annotations.
dlls/msvcrt: Add thread safety annotations.
dlls/kernelbase: Add thread safety annotations.
include/wine/winbase16: Add thread safety annotations for _Enter/LeaveSysLevel
dlls/kernelbase: Release console_section in case of an allocation failure in alloc_console.
include/winbase.h: Add thread safety annotations for Enter/LeaveCriticalSection, SleepConditionVariableCS and TryEnterCriticalSection.
dlls/ntdll: Add thread safety annotations.
configure: Enable -Wthread-safety-analysis, -Wthread-safety-attributes warnings.
include/winternl.h: Add thread safety annotations to several NT synchronization primitives.
include/winnt.h: Add macros for thread safety annotations.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6623
--
v2: d3d9: Do not apply the stateblock when clearing.
d3d8: Do not apply the stateblock when clearing.
ddraw: Do not apply the entire stateblock when clearing.
wined3d: Move rasterizer state invalidation to wined3d_stateblock_set_render_state().
https://gitlab.winehq.org/wine/wine/-/merge_requests/6564
--
v2: win32u: Support QDC_VIRTUAL_MODE_AWARE in NtUserQueryDisplayConfig().
win32u: Support QDC_VIRTUAL_MODE_AWARE in NtUserGetDisplayConfigBufferSizes().
user32/tests: Add tests for QueryDisplayConfig( QDC_VIRTUAL_MODE_AWARE ).
https://gitlab.winehq.org/wine/wine/-/merge_requests/6603
According to microsoft documentation, GetClientRect, ScrollWindowEx, SetScrollPos and SetScrollRange (among others) may only
be called while the control is in-place active.
This fixes a segmentation fault in Anytone CPS.
--
v4: riched20/tests: Test that ScrollWindowEx and GetClientRect are only called when control is in-place active.
riched20: Only call ME_SendRequestResize when control is in-place active.
riched20: Exit from editor_ensure_visible when control is not in-place active.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6608
--
v2: win32u: Introduce a new NtUserSetRawWindowPos call for the drivers.
winex11: Use XTranslateCoordinates to compute relative coordinates.
winex11: Use NtUserSetWindowPos when DPI awareness is unnecessary.
winemac: Use NtUserSetWindowPos when DPI awareness is unnecessary.
winemac: Stop mapping toplevel window rects to parent window.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6613
--
v2: dplayx/tests: Test receiving ADDFORWARDREPLY.
dplayx: Handle ADDFORWARDREPLY and return error.
dplayx/tests: Test receiving REQUESTPLAYERREPLY with error result.
dplayx: Check reply result in DP_MSG_SendRequestPlayerId().
dplayx: Use the documented reply layout in DP_MSG_SendRequestPlayerId().
dplayx: Free message header on error path in DP_MSG_SendRequestPlayerId().
https://gitlab.winehq.org/wine/wine/-/merge_requests/6632
This MR introduces support for [thread safety annotations,](https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#conditi… currently supported by Clang. The feature is similar to `__WINE_MALLOC` attributes, allowing functions, data members and global variables to be optionally annotated with synchronization details.
As a proof of concept, I have annotated `RTL_CRITICAL_SECTION` and `dlls/ntdll`.
Because the feature was designed as a C++ extension first, a bit of stubbing is required to annotate struct fields about what lock they are guarded by. The macros `WINE_DECLARE_LOCK_FIELD_STUB` and `WINE_DEFINE_LOCK_FIELD_STUB` take care of that. For instance, in `dlls/ntdll/threadpool.c`:
```c
WINE_DECLARE_LOCK_FIELD_STUB(threadpool_group, CRITICAL_SECTION, cs);
struct threadpool_group
{
LONG refcount;
BOOL shutdown;
CRITICAL_SECTION cs;
/* list of group members, locked via .cs */
struct list members __WINE_FIELD_GUARDED_BY(threadpool_group, cs);
};
WINE_DEFINE_LOCK_FIELD_STUB(threadpool_group, CRITICAL_SECTION, cs);
```
Clang will therefore warn if `members` is accessed without holding `cs`.
Note that the analyzer does not support conditional locking. For that reason, functions that hold and release a lock conditionally have been marked with `__WINE_NO_THREAD_SAFETY_ANALYSIS` to pre-empt false positives from Clang.
--
v6: dlls/amstream/tests: Disable thread safety analysis for testfilter_wait_state.
dlls/winhttp: Add thread safety annotations.
dlls/mmdevapi: Add thread safety annotations for session_lock and sessions_unlock.
dlls/mfplat: Add thread safety annotations.
dlls/msi: Add thread safety annotations for msiobj_lock and msiobj_unlock.
dlls/xaudio2_7: Add thread safety annotations.
dlls/wmvcore: Add thread safety annotations for async_reader_wait_pts, async_reader_deliver_sample, and callback_thread_run.
dlls/wininet: Disable thread safety annotations for HTTPREQ_ReadFile and HTTPREQ_QueryDataAvailable.
dlls/winegstreamer: Add thread safety annotation for GST_Seeking_SetPositions.
dlls/dwrite: Add thread safety annotations for factory_lock and factory_unlock.
dlls/wined3d: Add thread safety annotations.
lib/vkd3d: Build with WINE_NO_THREAD_SAFETY_ANALYSIS defined.
dlls/d2d1: Add thread safety annotations.
dlls/xaudio2_7: Disable thread safety analysis for IXAudio2Impl_CreateSourceVoice.
dlls/xinput1_3: Add thread safety annotations for controller_lock and controller_unlock.
dlls/ucrtbase/tests: Only release &fp.iobuf->_crit if the previous lock was successful (Clang).
dlls/netio.sys: Add thread safety annotations for lock_sock and unlock_socket.
dlls/msvcirt/tests: Release &sb.lock only if the previous lock was successful (Clang).
dlls/wbemprox: Add thread safety annotations.
libs/strmbase: Annotate BaseRenderer_Receive to indicate the caller needs to hold the underlying filter lock.
dlls/rpcrt4: Add thread safety annotations for AllocateContextHandle, FindContextHandle, ReleaseContextHandle.
dlls/wined3d: Add thread safety annotations for allocator locking helpers.
dlls/mfreadwrite: Indicate calling source_reader_read_sample requires holding &reader->cs.
dlls/mapi32: Add thread safety annotations for GetValue, AddValue, Lock, Unlock.
dlls/kernel32/tests: Add thread safety annotations.
dlls/combase: Add thread safety annotations
programs/services: Add thread safety annotations.
dlls/winmm: Add thread safety annotations.
dlls/vcomp: Add thread safety annotations.
dlls/user32: Add thread safety annotations.
dlls/odbc32: Add thread safety annotations.
dlls/krnl386.exe16: Add thread safety annotations.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6623
This MR introduces support for [thread safety annotations,](https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#conditi… currently supported by Clang. The feature is similar to `__WINE_MALLOC` attributes, allowing functions, data members and global variables to be optionally annotated with synchronization details.
As a proof of concept, I have annotated `RTL_CRITICAL_SECTION` and `dlls/ntdll`.
Because the feature was designed as a C++ extension first, a bit of stubbing is required to annotate struct fields about what lock they are guarded by. The macros `WINE_DECLARE_LOCK_FIELD_STUB` and `WINE_DEFINE_LOCK_FIELD_STUB` take care of that. For instance, in `dlls/ntdll/threadpool.c`:
```c
WINE_DECLARE_LOCK_FIELD_STUB(threadpool_group, CRITICAL_SECTION, cs);
struct threadpool_group
{
LONG refcount;
BOOL shutdown;
CRITICAL_SECTION cs;
/* list of group members, locked via .cs */
struct list members __WINE_FIELD_GUARDED_BY(threadpool_group, cs);
};
WINE_DEFINE_LOCK_FIELD_STUB(threadpool_group, CRITICAL_SECTION, cs);
```
Clang will therefore warn if `members` is accessed without holding `cs`.
Note that the analyzer does not support conditional locking. For that reason, functions that hold and release a lock conditionally have been marked with `__WINE_NO_THREAD_SAFETY_ANALYSIS` to pre-empt false positives from Clang.
--
v5: dlls/amstream/tests: Disable thread safety analysis for testfilter_wait_state.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6623
When passing a box with a non-zero height that is smaller than the bounding box to GdipMeasureString, it returns a bounding box of 0. In Windows it returns the same height as the box.
--
v2: gdiplus: Assign box height when bounding box height is larger.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6597
These patches are the last big changes to the pixel_format_desc structure.
Patch 2 of this feels like it might be a bit big, but I couldn't really come up with a clean way to split it. :)
--
v2: d3dx9: Add support for D3DFMT_A8P8.
d3dx9: Add support for D3DFMT_A2W10V10U10.
d3dx9: Add support for D3DFMT_X8L8V8U8.
d3dx9: Get rid of index_to_rgba callback.
d3dx9: Get rid of la_{to,from}_rgba format callbacks.
d3dx9: Always align and mask channel bits in format_to_d3dx_color().
d3dx9: Rework pixel_format_desc structure format type value.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6568
These patches are the last big changes to the pixel_format_desc structure.
Patch 2 of this feels like it might be a bit big, but I couldn't really come up with a clean way to split it. :)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6568
This MR is the first of at least three MRs adding support for the Bluetooth stack API in Wine:
1. The winebth.sys driver, which talks to BlueZ and implements several key IOCTLs for communicating with Bluetooth devices and radios.
2. A bthserv service, which is responsible for keeping track of the authentication agent, and relaying authentication requests and responses to and from the driver.
3. Userspace APIs (bluetoothapis.dll, bthprops.cpl, Windows.Devices.Bluetooth, etc).
winebth.sys is split into two "sub" drivers:
`winebth.sys`: The main entrypoint, loaded by winedevice. It listens for changes to Bluetooth devices and radios and authentication events on BlueZ, passing them on the bthenum. It also handles most IOCTL operations on Bluetooth radio PDOs.
`bthenum`: Responsible for creating nodes for discovered Bluetooth devices and associated services. It also tries to validate any IOCTLs relating to bluetooth devices before passing them to winebth.sys.
The unix code is split between dbus.c, unixlib.c and winebluetooth.c, where winebluetooth is a simple wrapper around unixlib for the sake of organization.
--
v5: winebth.sys: Implement IOCTL_WINEBTH_SEND_AUTH_RESPONSE.
winebth.sys: Add support for receiving authentication requests/events.
winebth.sys: Add support for BLUETOOTH_RADIO_IN_RANGE events (WM_DEVICECHANGE).
winebth.sys: Implement IOCTL commands IOCTL_WINEBTH_RADIO_SET_FLAG and IOCTL_WINEBTH_RADIO_UNSET_FLAG.
winebth.sys: Implement IOCTL commands IOCTL_WINEBTH_RADIO_START_DISCOVERY and IOCTL_WINEBTH_RADIO_STOP_DISCOVERY.
winebth.sys: Implement IOCTL_BTH_GET_LOCAL_INFO for radio devices.
winebth.sys: Update radio PDO properties when BlueZ sends us a PropertiesChanged for an adapter.
winebth.sys: Create PDOs for Bluetooth services discovered on remote devices.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6621
This MR is the first of at least three MRs adding support for the Bluetooth stack API in Wine:
1. The winebth.sys driver, which talks to BlueZ and implements several key IOCTLs for communicating with Bluetooth devices and radios.
2. A bthserv service, which is responsible for keeping track of the authentication agent, and relaying authentication requests and responses to and from the driver.
3. Userspace APIs (bluetoothapis.dll, bthprops.cpl, Windows.Devices.Bluetooth, etc).
winebth.sys is split into two "sub" drivers:
`winebth.sys`: The main entrypoint, loaded by winedevice. It listens for changes to Bluetooth devices and radios and authentication events on BlueZ, passing them on the bthenum. It also handles most IOCTL operations on Bluetooth radio PDOs.
`bthenum`: Responsible for creating nodes for discovered Bluetooth devices and associated services. It also tries to validate any IOCTLs relating to bluetooth devices before passing them to winebth.sys.
The unix code is split between dbus.c, unixlib.c and winebluetooth.c, where winebluetooth is a simple wrapper around unixlib for the sake of organization.
--
v4: winebth.sys: Implement IOCTL_WINEBTH_SEND_AUTH_RESPONSE.
winebth.sys: Add support for receiving authentication requests/events.
winebth.sys: Add support for BLUETOOTH_RADIO_IN_RANGE events (WM_DEVICECHANGE).
winebth.sys: Implement IOCTL commands IOCTL_WINEBTH_RADIO_SET_FLAG and IOCTL_WINEBTH_RADIO_UNSET_FLAG.
winebth.sys: Implement IOCTL commands IOCTL_WINEBTH_RADIO_START_DISCOVERY and IOCTL_WINEBTH_RADIO_STOP_DISCOVERY.
winebth.sys: Implement IOCTL_BTH_GET_LOCAL_INFO for radio devices.
winebth.sys: Update radio PDO properties when BlueZ sends us a PropertiesChanged for an adapter.
winebth.sys: Create PDOs for Bluetooth services discovered on remote devices.
winebth.sys: Create PDOs for newly discovered remote Bluetooth devices.
winebth.sys: Create PDOs for newly discovered Bluetooth radios.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6621
This MR introduces support for [thread safety annotations,](https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#conditi… currently supported by Clang. The feature is similar to `__WINE_MALLOC` attributes, allowing functions, data members and global variables to be optionally annotated with synchronization details.
As a proof of concept, I have successfully annotated `dlls/ntdll` code, and it should build without any warnings.
Because the feature was designed as a C++ extension first, a bit of stubbing is required to annotate struct fields about what lock they are guarded by. The macros `WINE_DECLARE_LOCK_FIELD_STUB` and `WINE_DEFINE_LOCK_FIELD_STUB` take care of that. For instance, in `dlls/ntdll/threadpool.c`:
```c
WINE_DECLARE_LOCK_FIELD_STUB(threadpool_group, CRITICAL_SECTION, cs);
struct threadpool_group
{
LONG refcount;
BOOL shutdown;
CRITICAL_SECTION cs;
/* list of group members, locked via .cs */
struct list members __WINE_FIELD_GUARDED_BY(threadpool_group, cs);
};
WINE_DEFINE_LOCK_FIELD_STUB(threadpool_group, CRITICAL_SECTION, cs);
```
Clang will therefore warn if `members` is accessed without holding `cs`.
Note that the analyzer does not support conditional locking. For that reason, functions that hold and release a lock conditionally have been marked with `__WINE_NO_THREAD_SAFETY_ANALYSIS` to pre-empt false positives from Clang.
--
v2: ntdll: Add thread safety annotations.
configure: Enable -Wthread-safety-analysis, -Wthread-safety-attributes warnings.
include/winternl.h: Add thread safety annotations to several NT synchronization primitives.
include/winnt.h: Add macros for thread safety annotations.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6623
This MR introduces support for [thread safety annotations,](https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#conditi… currently supported by Clang. The feature is similar to `__WINE_MALLOC` attributes, allowing functions, data members and global variables to be optionally annotated with synchronization details.
As a proof of concept, I have successfully annotated `dlls/ntdll` code, and it should build without any warnings.
Because the feature was designed as a C++ extension first, a bit of stubbing is required to annotate struct fields about what lock they are guarded by. The macros `WINE_DECLARE_LOCK_FIELD_STUB` and `WINE_DEFINE_LOCK_FIELD_STUB` take care of that. For instance, in `dlls/ntdll/threadpool.c`:
```c
WINE_DECLARE_LOCK_FIELD_STUB(threadpool_group, CRITICAL_SECTION, cs);
struct threadpool_group
{
LONG refcount;
BOOL shutdown;
CRITICAL_SECTION cs;
/* list of group members, locked via .cs */
struct list members __WINE_FIELD_GUARDED_BY(threadpool_group, cs);
};
WINE_DEFINE_LOCK_FIELD_STUB(threadpool_group, CRITICAL_SECTION, cs);
```
Clang will therefore warn if `members` is accessed without holding `cs`.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6623
This MR is the first of at least three MRs adding support for the Bluetooth stack API in Wine:
1. The winebth.sys driver, which talks to BlueZ and implements several key IOCTLs for communicating with Bluetooth devices and radios.
2. A bthserv service, which is responsible for keeping track of the authentication agent, and relaying authentication requests and responses to and from the driver.
3. Userspace APIs (bluetoothapis.dll, bthprops.cpl, Windows.Devices.Bluetooth, etc).
winebth.sys is split into two "sub" drivers:
`winebth.sys`: The main entrypoint, loaded by winedevice. It listens for changes to Bluetooth devices and radios and authentication events on BlueZ, passing them on the bthenum. It also handles most IOCTL operations on Bluetooth radio PDOs.
`bthenum`: Responsible for creating nodes for discovered Bluetooth devices and associated services. It also tries to validate any IOCTLs relating to bluetooth devices before passing them to winebth.sys.
The unix code is split between dbus.c, unixlib.c and winebluetooth.c, where winebluetooth is a simple wrapper around unixlib for the sake of organization.
--
v3: winebth.sys: Implement IOCTL_WINEBTH_SEND_AUTH_RESPONSE.
winebth.sys: Add support for receiving authentication requests/events.
winebth.sys: Add support for BLUETOOTH_RADIO_IN_RANGE events (WM_DEVICECHANGE).
winebth.sys: Implement IOCTL commands IOCTL_WINEBTH_RADIO_SET_FLAG and IOCTL_WINEBTH_RADIO_UNSET_FLAG.
winebth.sys: Implement IOCTL commands IOCTL_WINEBTH_RADIO_START_DISCOVERY and IOCTL_WINEBTH_RADIO_STOP_DISCOVERY.
winebth.sys: Implement IOCTL_BTH_GET_LOCAL_INFO for radio devices.
winebth.sys: Update radio PDO properties when BlueZ sends us a PropertiesChanged for an adapter.
winebth.sys: Create PDOs for Bluetooth services discovered on remote devices.
winebth.sys: Create PDOs for newly discovered remote Bluetooth devices.
winebth.sys: Create PDOs for newly discovered Bluetooth radios.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6621
This MR should be the first of at least three MRs, adding support for the Bluetooth stack API in Wine:
1. The winebth.sys driver, which talks to BlueZ and implements several key IOCTLs for communicating with Bluetooth devices and radios.
2. A bthserv service, which is responsible for keeping track of the authentication agent, and relaying authentication requests and responses to and from the driver.
3. Userspace APIs (bluetoothapis.dll, bthprops.cpl, Windows.Devices.Bluetooth, etc).
winebth.sys is split into two drivers:
winebth.sys: The main entrypoint, loaded by winedevice. It listens for changes to Bluetooth devices and radios and authentication events on BlueZ, passing them on the bthenum. It also handles most IOCTL operations on Bluetooth radio PDOs.
bthenum: Responsible for creating nodes for discovered Bluetooth devices and associated services. It also tries to validate any IOCTLs relating to bluetooth devices before passing them to winebth.sys.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6621