Trying to browse through the debugger.chm from an old windbg version with hh.exe, I encountered below ASan message.
The reallocation path was not entered when `This->travellog.size < This->travellog.position+1`, with e.g. size == 4 and position == 3.
Unfortunately the increment of position takes place a few lines later, therefore writing at index 4 of array with size 4.
```
=================================================================
==hh.exe==316==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7e99833c9a80 at pc 0x6ffffe8490da bp 0x7ffffe1fea70 sp 0x7ffffe1feab0
WRITE of size 16 at 0x7e99833c9a80 thread T0
#0 0x6ffffe8490d9 in __asan_memset /home/runner/work/llvm-mingw/llvm-mingw/llvm-project/compiler-rt\lib/asan/asan_interceptors_memintrinsics.cpp:67:3
#1 0x6ffffa7cb968 in update_travellog /home/bernhard/data/entwicklung/2025/wine\wine/dlls/ieframe/dochost.c:471:59
#2 0x6ffffa7caf09 in ClOleCommandTarget_Exec /home/bernhard/data/entwicklung/2025/wine\wine/dlls/ieframe/dochost.c:780:13
#3 0x6ffff929b38a in IOleCommandTarget_Exec /home/bernhard/data/entwicklung/2025/wine/wine-build/llvm-newwow64-asan-pe/obj\include\docobj.h:848:12
#4 0x6ffff929ad8c in notify_travellog_update /home/bernhard/data/entwicklung/2025/wine\wine/dlls/mshtml/persist.c:71:9
#5 0x6ffff929a82b in set_current_mon /home/bernhard/data/entwicklung/2025/wine\wine/dlls/mshtml/persist.c:108:17
#6 0x6ffff923abb7 in navigate_proc /home/bernhard/data/entwicklung/2025/wine\wine/dlls/mshtml/navigate.c:2155:9
#7 0x6ffff92d43df in hidden_proc /home/bernhard/data/entwicklung/2025/wine\wine/dlls/mshtml/task.c:398:17
#8 0x6ffffd3f3c8e in WINPROC_wrapper /home/bernhard/data/entwicklung/2025/wine\wine/dlls/user32/winproc.c:86:12
#9 0x6ffffd3f28c8 in call_window_proc /home/bernhard/data/entwicklung/2025/wine\wine/dlls/user32/winproc.c:111:15
#10 0x6ffffd3f2ab2 in dispatch_win_proc_params /home/bernhard/data/entwicklung/2025/wine\wine/dlls/user32/winproc.c
#11 0x6ffffd3df4fb in dispatch_message /home/bernhard/data/entwicklung/2025/wine\wine/dlls/user32/message.c:804:14
#12 0x6ffffd3df5a1 in DispatchMessageW /home/bernhard/data/entwicklung/2025/wine\wine/dlls/user32/message.c:890:16
#13 0x6ffffdc63d8e in doWinMain /home/bernhard/data/entwicklung/2025/wine\wine/dlls/hhctrl.ocx/hhctrl.c:580:9
#14 0x000140001036 in WinMain /home/bernhard/data/entwicklung/2025/wine\wine/programs/hh/main.c:34:12
#15 0x00014000118f in main /home/bernhard/data/entwicklung/2025/wine\wine/dlls/msvcrt/crt_winmain.c:53:12
#16 0x0001400010b5 in mainCRTStartup /home/bernhard/data/entwicklung/2025/wine\wine/dlls/msvcrt/crt_main.c:58:11
#17 0x6fffffc3565e in BaseThreadInitThunk /home/bernhard/data/entwicklung/2025/wine\wine/dlls/kernel32/thread.c:61:24
#18 0x6fffffdbba1a in RtlUserThreadStart (C:\windows\system32\ntdll.dll+0x17004ba1a)
0x7e99833c9a80 is located 0 bytes after 64-byte region [0x7e99833c9a40,0x7e99833c9a80)
allocated by thread T0 here:
#0 0x6ffffe84a4a1 in malloc /home/runner/work/llvm-mingw/llvm-mingw/llvm-project/compiler-rt\lib/asan/asan_malloc_win.cpp:80:3
#1 0x6ffffa7cb68b in update_travellog /home/bernhard/data/entwicklung/2025/wine\wine/dlls/ieframe/dochost.c:437:31
#2 0x6ffffa7caf09 in ClOleCommandTarget_Exec /home/bernhard/data/entwicklung/2025/wine\wine/dlls/ieframe/dochost.c:780:13
#3 0x6ffff929b38a in IOleCommandTarget_Exec /home/bernhard/data/entwicklung/2025/wine/wine-build/llvm-newwow64-asan-pe/obj\include\docobj.h:848:12
#4 0x6ffff929ad8c in notify_travellog_update /home/bernhard/data/entwicklung/2025/wine\wine/dlls/mshtml/persist.c:71:9
#5 0x6ffff929a82b in set_current_mon /home/bernhard/data/entwicklung/2025/wine\wine/dlls/mshtml/persist.c:108:17
#6 0x6ffff923abb7 in navigate_proc /home/bernhard/data/entwicklung/2025/wine\wine/dlls/mshtml/navigate.c:2155:9
#7 0x6ffff92d43df in hidden_proc /home/bernhard/data/entwicklung/2025/wine\wine/dlls/mshtml/task.c:398:17
#8 0x6ffffd3f3c8e in WINPROC_wrapper /home/bernhard/data/entwicklung/2025/wine\wine/dlls/user32/winproc.c:86:12
#9 0x6ffffd3f28c8 in call_window_proc /home/bernhard/data/entwicklung/2025/wine\wine/dlls/user32/winproc.c:111:15
#10 0x6ffffd3f2ab2 in dispatch_win_proc_params /home/bernhard/data/entwicklung/2025/wine\wine/dlls/user32/winproc.c
#11 0x6ffffd3df4fb in dispatch_message /home/bernhard/data/entwicklung/2025/wine\wine/dlls/user32/message.c:804:14
#12 0x6ffffd3df5a1 in DispatchMessageW /home/bernhard/data/entwicklung/2025/wine\wine/dlls/user32/message.c:890:16
#13 0x6ffffdc63d8e in doWinMain /home/bernhard/data/entwicklung/2025/wine\wine/dlls/hhctrl.ocx/hhctrl.c:580:9
#14 0x000140001036 in WinMain /home/bernhard/data/entwicklung/2025/wine\wine/programs/hh/main.c:34:12
#15 0x00014000118f in main /home/bernhard/data/entwicklung/2025/wine\wine/dlls/msvcrt/crt_winmain.c:53:12
#16 0x0001400010b5 in mainCRTStartup /home/bernhard/data/entwicklung/2025/wine\wine/dlls/msvcrt/crt_main.c:58:11
#17 0x6fffffc3565e in BaseThreadInitThunk /home/bernhard/data/entwicklung/2025/wine\wine/dlls/kernel32/thread.c:61:24
#18 0x6fffffdbba1a in RtlUserThreadStart (C:\windows\system32\ntdll.dll+0x17004ba1a)
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/bernhard/data/entwicklung/2025/wine\wine/dlls/ieframe/dochost.c:471:59 in update_travellog
Shadow bytes around the buggy address:
0x7e99833c9800: fd fd fd fd fd fd fd fa fa fa fa fa fd fd fd fd
0x7e99833c9880: fd fd fd fa fa fa fa fa fd fd fd fd fd fd fd fd
0x7e99833c9900: fa fa fa fa 00 00 00 00 00 00 00 fa fa fa fa fa
0x7e99833c9980: 00 00 00 00 00 00 00 fa fa fa fa fa fd fd fd fd
0x7e99833c9a00: fd fd fd fd fa fa fa fa 00 00 00 00 00 00 00 00
=>0x7e99833c9a80:[fa]fa fa fa fd fd fd fd fd fd fd fd fa fa fa fa
0x7e99833c9b00: 00 00 00 00 00 00 00 fa fa fa fa fa fd fd fd fd
0x7e99833c9b80: fd fd fd fa fa fa fa fa 00 00 00 00 00 00 00 fa
0x7e99833c9c00: fa fa fa fa 00 00 00 00 00 00 00 fa fa fa fa fa
0x7e99833c9c80: 00 00 00 00 00 00 00 fa fa fa fa fa fd fd fd fd
0x7e99833c9d00: fd fd fd fd fa fa fa fa fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
```
--
v2: ieframe: Enter reallocation path one position earlier (ASan).
https://gitlab.winehq.org/wine/wine/-/merge_requests/7544
This series contain fixes for winedump for debug information:
- it fixes a bunch of incorrect information dumping,
- it fixes a case of crash for .DBG files,
- it allows dumping very large PDB files (>4G)
Note: for the later item, current tools' read_file() doesn't work with
such large files.
Instead of fixing read_file(), I opted for letting a dumper for a
given file format to only use a fd to the target file, instead of
forcing all dumpers to work from a full in-memory image of the target
file. This is useful for PDB files, as their underlying storage
requires to reassemble non-contiguous blocks, so this saves memory
(the in-memory image of the target file) and one copy of the whole file.
This means that all functions to guess the file format now uses a fd
instead of the full image.
--
v2: tools/winedump: Support dumping large PDB files (>4G).
tools/winedump: Support more than 64K files in PDB DBI module source substream.
tools/winedump: Don't miss hash entries in PDB files.
tools/winedump: Don't miss PDB_SYMBOL_RANGE* in PDB files.
tools/winedump: Use correct field when dumping CodeView symbols.
tools/winedump: Use correct computation for first section out of a .DBG file.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7212
--
v2: winegstreamer: Implement stream_sink_type_handler_GetMediaTypeByIndex.
winegstreamer: Implement stream_sink_type_handler_GetMediaTypeCount.
winegstreamer: Implement stream_sink_type_handler_GetMajorType.
winegstreamer: Assume stream type is always not NULL for media sink.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7538
winex11.drv: Resizing the window is allowed When the window is being restored from its maximized state.
When the window is restoring from the maximized state, its size should be adjustable.
Some window managers may not correctly send the PropertyNotify event for the _NET_WM_STATE property
When the window is maximized but its size is restricted to normal size by XSetWMNormalHints.
Signed-off-by: chenjiangyi <chenjiangyi(a)uniontech.com>
--
v2: winex11.drv: Resizing the window is allowed When the window is being restored from its maximized state.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7552
winex11.drv: Resizing the window is allowed When the window is being restored from its maximized state.
When the window is restoring from the maximized state, its size should be adjustable.
Some window managers may not correctly send the PropertyNotify event for the _NET_WM_STATE property
When the window is maximized but its size is restricted to normal size by XSetWMNormalHints.
Signed-off-by: chenjiangyi <chenjiangyi(a)uniontech.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7552
If the read ProgID only has a CurVer key and no CLSID key, it will directly return CO_E_CCLASSSTRING, causing the program to fail to continue running.
Add CurVer key value ProgID.x recognition and read the CLSID key value of ProgID.x
--
v3: ole32/tests:add CurVer in CLSIDFromProgID
https://gitlab.winehq.org/wine/wine/-/merge_requests/7539
PHP 8.2.7 check that vcruntime140.dll is have the linker version equal to the version of the linker of the toolchain used to build itself, and refuse to start otherwise, with this error message:
`PHP Warning: 'C:\windows\system32\VCRUNTIME140.dll' 2.39 is not compatible with this PHP build linked with 14.29 in Unknown on line 0`
Setting the linker version in winebuild to 14.29 allow php to pass this check.
If there are concerns to having this change global, I could try to make this as argument to winebuild with the value setted somewhere into the build system
Signed-off-by: Lorenzo Ferrillo <lorenzofersteam(a)live.it>
--
v4: winebuild: Use know 14.29 version for the linker version of dll files
https://gitlab.winehq.org/wine/wine/-/merge_requests/6377
This MR adds an initial implementation of the winsock `WSALookupsService*` methods for performing Bluetooth device discovery (`LUP_CONTAINERS`).
Pending !7472, the code will also eventually support performing device inquiry scans.
--
v4: ws2_32: Implement WSALookupServiceNext for Bluetooth device discovery.
ws2_32: Implement WSALookupServiceBegin for Bluetooth device discovery.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7542
This MR adds an initial implementation of the winsock `WSALookupsService*` methods for performing Bluetooth device discovery (`LUP_CONTAINERS`).
Pending !7472, the code will also eventually support performing device inquiry scans.
--
v3: ws2_32: Implement WSALookupServiceNext for Bluetooth device discovery.
ws2_32: Implement WSALookupServiceBegin for Bluetooth device discovery.
ws_32/tests: Add tests for Bluetooth discovery in WSALookupServiceBegin/Next.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7542
--
v6: server: When renaming, only fstat the source once.
server: Handle hardlinks and casefolding when renaming the same file.
kernel32/tests: Test renaming a file into a hardlink of itself.
kernel32/tests: Use FindClose instead of CloseHandle when closing
https://gitlab.winehq.org/wine/wine/-/merge_requests/6855
This MR adds an initial implementation of the winsock `WSALookupsService*` methods for performing Bluetooth device discovery (`LUP_CONTAINERS`).
Pending !7472, the code will also eventually support performing device inquiry scans.
--
v2: ws2_32: Implement WSALookupServiceNext for Bluetooth device discovery.
ws2_32: Implement WSALookupServiceBegin for Bluetooth device discovery.
ws_32/tests: Add tests for Bluetooth discovery in WSALookupServiceBegin/Next.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7542
This series contain fixes for winedump for debug information:
- it fixes a bunch of incorrect information dumping,
- it fixes a case of crash for .DBG files,
- it allows dumping very large PDB files (>4G)
Note: for the later item, current tools' read_file() doesn't work with
such large files.
Instead of fixing read_file(), I opted for letting a dumper for a
given file format to only use a fd to the target file, instead of
forcing all dumpers to work from a full in-memory image of the target
file. This is useful for PDB files, as their underlying storage
requires to reassemble non-contiguous blocks, so this saves memory
(the in-memory image of the target file) and one copy of the whole file.
This means that all functions to guess the file format now uses a fd
instead of the full image.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7212
Array selector data begins with 4 bytes length, followed by string
bytes. Right after the string starts the code blob, that we access
with (uint32_t *)(ptr + string_size) + 1. There is no separate
field to care about at (ptr + string_size).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7547
PathRemoveFileSpecW keeps only the drive if the path contains all forward slashes as shown in tests.
But then the temporary file is created in the root folder which fails for drive Z:.
This fixes a corner case when using CMake in Wine. Another usage of PathRemoveFileSpecW is in PathRelativePathToW which should be also checked.
I'm leaving this as a draft until getting some feedback and adding tests.
--
v4: kernelbase: Handle correctly paths with forward slashes in ReplaceFileW.
kernel32: Test ReplaceFileW with forward slashes.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7290
Trying to browse through the debugger.chm from an old windbg version with hh.exe, I encountered below ASan message.
The reallocation path was not entered when `This->travellog.size < This->travellog.position+1`, with e.g. size == 4 and position == 3.
Unfortunately the increment of position takes place a few lines later, therefore writing at index 4 of array with size 4.
```
=================================================================
==hh.exe==316==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7e99833c9a80 at pc 0x6ffffe8490da bp 0x7ffffe1fea70 sp 0x7ffffe1feab0
WRITE of size 16 at 0x7e99833c9a80 thread T0
#0 0x6ffffe8490d9 in __asan_memset /home/runner/work/llvm-mingw/llvm-mingw/llvm-project/compiler-rt\lib/asan/asan_interceptors_memintrinsics.cpp:67:3
#1 0x6ffffa7cb968 in update_travellog /home/bernhard/data/entwicklung/2025/wine\wine/dlls/ieframe/dochost.c:471:59
#2 0x6ffffa7caf09 in ClOleCommandTarget_Exec /home/bernhard/data/entwicklung/2025/wine\wine/dlls/ieframe/dochost.c:780:13
#3 0x6ffff929b38a in IOleCommandTarget_Exec /home/bernhard/data/entwicklung/2025/wine/wine-build/llvm-newwow64-asan-pe/obj\include\docobj.h:848:12
#4 0x6ffff929ad8c in notify_travellog_update /home/bernhard/data/entwicklung/2025/wine\wine/dlls/mshtml/persist.c:71:9
#5 0x6ffff929a82b in set_current_mon /home/bernhard/data/entwicklung/2025/wine\wine/dlls/mshtml/persist.c:108:17
#6 0x6ffff923abb7 in navigate_proc /home/bernhard/data/entwicklung/2025/wine\wine/dlls/mshtml/navigate.c:2155:9
#7 0x6ffff92d43df in hidden_proc /home/bernhard/data/entwicklung/2025/wine\wine/dlls/mshtml/task.c:398:17
#8 0x6ffffd3f3c8e in WINPROC_wrapper /home/bernhard/data/entwicklung/2025/wine\wine/dlls/user32/winproc.c:86:12
#9 0x6ffffd3f28c8 in call_window_proc /home/bernhard/data/entwicklung/2025/wine\wine/dlls/user32/winproc.c:111:15
#10 0x6ffffd3f2ab2 in dispatch_win_proc_params /home/bernhard/data/entwicklung/2025/wine\wine/dlls/user32/winproc.c
#11 0x6ffffd3df4fb in dispatch_message /home/bernhard/data/entwicklung/2025/wine\wine/dlls/user32/message.c:804:14
#12 0x6ffffd3df5a1 in DispatchMessageW /home/bernhard/data/entwicklung/2025/wine\wine/dlls/user32/message.c:890:16
#13 0x6ffffdc63d8e in doWinMain /home/bernhard/data/entwicklung/2025/wine\wine/dlls/hhctrl.ocx/hhctrl.c:580:9
#14 0x000140001036 in WinMain /home/bernhard/data/entwicklung/2025/wine\wine/programs/hh/main.c:34:12
#15 0x00014000118f in main /home/bernhard/data/entwicklung/2025/wine\wine/dlls/msvcrt/crt_winmain.c:53:12
#16 0x0001400010b5 in mainCRTStartup /home/bernhard/data/entwicklung/2025/wine\wine/dlls/msvcrt/crt_main.c:58:11
#17 0x6fffffc3565e in BaseThreadInitThunk /home/bernhard/data/entwicklung/2025/wine\wine/dlls/kernel32/thread.c:61:24
#18 0x6fffffdbba1a in RtlUserThreadStart (C:\windows\system32\ntdll.dll+0x17004ba1a)
0x7e99833c9a80 is located 0 bytes after 64-byte region [0x7e99833c9a40,0x7e99833c9a80)
allocated by thread T0 here:
#0 0x6ffffe84a4a1 in malloc /home/runner/work/llvm-mingw/llvm-mingw/llvm-project/compiler-rt\lib/asan/asan_malloc_win.cpp:80:3
#1 0x6ffffa7cb68b in update_travellog /home/bernhard/data/entwicklung/2025/wine\wine/dlls/ieframe/dochost.c:437:31
#2 0x6ffffa7caf09 in ClOleCommandTarget_Exec /home/bernhard/data/entwicklung/2025/wine\wine/dlls/ieframe/dochost.c:780:13
#3 0x6ffff929b38a in IOleCommandTarget_Exec /home/bernhard/data/entwicklung/2025/wine/wine-build/llvm-newwow64-asan-pe/obj\include\docobj.h:848:12
#4 0x6ffff929ad8c in notify_travellog_update /home/bernhard/data/entwicklung/2025/wine\wine/dlls/mshtml/persist.c:71:9
#5 0x6ffff929a82b in set_current_mon /home/bernhard/data/entwicklung/2025/wine\wine/dlls/mshtml/persist.c:108:17
#6 0x6ffff923abb7 in navigate_proc /home/bernhard/data/entwicklung/2025/wine\wine/dlls/mshtml/navigate.c:2155:9
#7 0x6ffff92d43df in hidden_proc /home/bernhard/data/entwicklung/2025/wine\wine/dlls/mshtml/task.c:398:17
#8 0x6ffffd3f3c8e in WINPROC_wrapper /home/bernhard/data/entwicklung/2025/wine\wine/dlls/user32/winproc.c:86:12
#9 0x6ffffd3f28c8 in call_window_proc /home/bernhard/data/entwicklung/2025/wine\wine/dlls/user32/winproc.c:111:15
#10 0x6ffffd3f2ab2 in dispatch_win_proc_params /home/bernhard/data/entwicklung/2025/wine\wine/dlls/user32/winproc.c
#11 0x6ffffd3df4fb in dispatch_message /home/bernhard/data/entwicklung/2025/wine\wine/dlls/user32/message.c:804:14
#12 0x6ffffd3df5a1 in DispatchMessageW /home/bernhard/data/entwicklung/2025/wine\wine/dlls/user32/message.c:890:16
#13 0x6ffffdc63d8e in doWinMain /home/bernhard/data/entwicklung/2025/wine\wine/dlls/hhctrl.ocx/hhctrl.c:580:9
#14 0x000140001036 in WinMain /home/bernhard/data/entwicklung/2025/wine\wine/programs/hh/main.c:34:12
#15 0x00014000118f in main /home/bernhard/data/entwicklung/2025/wine\wine/dlls/msvcrt/crt_winmain.c:53:12
#16 0x0001400010b5 in mainCRTStartup /home/bernhard/data/entwicklung/2025/wine\wine/dlls/msvcrt/crt_main.c:58:11
#17 0x6fffffc3565e in BaseThreadInitThunk /home/bernhard/data/entwicklung/2025/wine\wine/dlls/kernel32/thread.c:61:24
#18 0x6fffffdbba1a in RtlUserThreadStart (C:\windows\system32\ntdll.dll+0x17004ba1a)
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/bernhard/data/entwicklung/2025/wine\wine/dlls/ieframe/dochost.c:471:59 in update_travellog
Shadow bytes around the buggy address:
0x7e99833c9800: fd fd fd fd fd fd fd fa fa fa fa fa fd fd fd fd
0x7e99833c9880: fd fd fd fa fa fa fa fa fd fd fd fd fd fd fd fd
0x7e99833c9900: fa fa fa fa 00 00 00 00 00 00 00 fa fa fa fa fa
0x7e99833c9980: 00 00 00 00 00 00 00 fa fa fa fa fa fd fd fd fd
0x7e99833c9a00: fd fd fd fd fa fa fa fa 00 00 00 00 00 00 00 00
=>0x7e99833c9a80:[fa]fa fa fa fd fd fd fd fd fd fd fd fa fa fa fa
0x7e99833c9b00: 00 00 00 00 00 00 00 fa fa fa fa fa fd fd fd fd
0x7e99833c9b80: fd fd fd fa fa fa fa fa 00 00 00 00 00 00 00 fa
0x7e99833c9c00: fa fa fa fa 00 00 00 00 00 00 00 fa fa fa fa fa
0x7e99833c9c80: 00 00 00 00 00 00 00 fa fa fa fa fa fd fd fd fd
0x7e99833c9d00: fd fd fd fd fa fa fa fa fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7544
On Tue Mar 11 09:22:36 2025 +0000, Rémi Bernon wrote:
> Do we really need to call back into wineserver? Seems unfortunate, maybe
> there's a better way?
I don't see how to avoid that in principle?
- the logic is triggered by calling DefWindowProc, so we can't avoid some action from DefWindowProc;
- after WM_POINTERUPDATE with changing coordinates the messages should be generated (and, separately, updating cursor position) regardless of DefWindowProc calls; also generating that in DefWindowProc ever is clumsy because NtUserSendHardwareInput() can't generate the exact message we need, that would need some custom interface (and won't avoid a server call to send message anyway);
- we could in principle stop sending those `track_mouse_from_pointer` calls once the tracking switched to server side (by returning the corresponding flag from this call and tracking this part of state in thread data), but we also want to update driver cursor position which seems to cope nicely with this call, in that case it would need to be done in some other more complicated ways. So reducing the amount of those calls (by not sending them once server tracking started) is possible but it will require these parts. I thought it doesn't add too much of calls, do you think it worth it?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7530#note_97421
On Tue Mar 11 09:22:36 2025 +0000, Rémi Bernon wrote:
> This changes always_queue from 0 to 1, is it intentional?
This is intentional because all the tracking and logic is to be done in the new track_mouse_message_from_pointer(), in a view of that some logic to skip mouse message generation in queue_hardware_message() looks misleading as best. But it doesn't belong to this patch actually, I am moving this change to the patch where track_mouse_message_from_pointer() is introduced.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7530#note_97420
This MR adds an initial implementation of the winsock `WSALookupsService*` methods for performing Bluetooth device discovery (`LUP_CONTAINERS`).
Pending !7472, the code will also eventually support performing device inquiry scans.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7542
This patch series implements `ID3DXEffect::SetRawValue()` for the simplest cases, which are vec4s and matrix 4x4s.
--
v2: d3dx9: Fixup return values for D3DXPT_BOOL parameters in ID3DXEffect::GetValue().
d3dx9: Add support for setting 4x4 matrices in ID3DXEffect::SetRawValue().
d3dx9: Partially implement ID3DXEffect::SetRawValue().
d3dx9/tests: Add tests for ID3DXEffect::SetRawValue().
https://gitlab.winehq.org/wine/wine/-/merge_requests/7505
--
v2: ntdll: Do not fail NtCreateUserProcess() if requested access doesn't have PROCESS_CREATE_THREAD.
ntdll/tests: Test NtCreateUserProcess() with limited access rights.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7517
Like BUG-57912 and BUG-57913, this was encountered in https://www.smwcentral.net/?p=section&a=details&id=33546 (.resources/Lunar Magic/scripts/insert_all_patches.bat).
Unfortunately, I was unable to write a passing test; winetest redirects the child's stdout to a file, so GetConsoleScreenBufferInfo fails. And some of those numbers will vary between machines. Should I just drop the test?
--
v3: cmd/tests: Add tests for new MODE command.
cmd: Introduce MODE command.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7491
Like BUG-57912 and BUG-57913, this was encountered in https://www.smwcentral.net/?p=section&a=details&id=33546 (.resources/Lunar Magic/scripts/insert_all_patches.bat).
Unfortunately, I was unable to write a passing test; winetest redirects the child's stdout to a file, so GetConsoleScreenBufferInfo fails. And some of those numbers will vary between machines. Should I just drop the test?
--
v2: cmd/tests: Add tests for new MODE command.
cmd: Introduce MODE command.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7491
In CopyFileEx, and DeleteFile functions, by default, the file name
and path are limited to MAX_PATH characters. To extend this limit
to 32,767 wide characters, need prepend "\\\\?\\" to the path.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7540
--
v2: dinput/tests: Add tests for mouse state tracking from pointer updates.
win32u: Update driver cursor position when it is changed by pointer.
win32u: Improve tracking mouse cursor based on pointer messages.
server: Merge WM_POINTERUPDATE messages.
server: Factor out queue_mouse_message_from_pointer().
server: Move find_pointer_from_id() up.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7530
If the read ProgID only has a CurVer key and no CLSID key, it will directly return CO_E_CCLASSSTRING, causing the program to fail to continue running.
Add CurVer key value ProgID.x recognition and read the CLSID key value of ProgID.x
--
v2: combase : clsid_from_string_reg() add read of CurVer key value.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7539
If the read ProgID only has a CurVer key and no CLSID key, it will directly return CO_E_CCLASSSTRING, causing the program to fail to continue running.
Add CurVer key value ProgID.x recognition and read the CLSID key value of ProgID.x
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7539
Changing the colour of the second pixel of the source bitmap clarifies
the incorrect behaviour of PixelOffsetMode Half and HighQuality.
This also provides better proof that PixelOffsetMode None and Fast are
implemented correctly.
Extending tests is starting point for further
improvements of implementation pixel offset modes
to match implementation from native gdiplus.
--
v2: gdiplus/tests: Extend DrawImage scaling tests.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3774
Thanks to Rémi Bernon for mentioning in !5814 the new test failure, which spurred the first patch of this MR. Then one thing led to another and somehow this whole MR happened...
--
v3: d3dcompiler/tests: Add d3dcompiler_42 tests.
d3dcompiler: Fix a few version-dependent error returns in D3DReflect().
d3dx9/tests: Add d3dx9_42 tests.
d3dx9_42: Generate an import library.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7536
Thanks to Rémi Bernon for mentioning in !5814 the new test failure, which spurred the first patch of this MR. Then one thing led to another and somehow this whole MR happened...
--
v2: d3dcompiler/tests: Add d3dcompiler_42 tests.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7536
Thanks to Rémi Bernon for mentioning in !5814 the new test failure, which spurred the the first patch of this MR. Then one thing led to another and somehow the whole MR happened...
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7536
Having a pointer lock implies that relative motion is also used. When
refocusing on a mouselook application which the driver is using relative
motion for, an absolute motion hardware input is sent because of
handling the wl_pointer.enter event. This can result in an unwanted
warp/jerk.
The need to handle enter motion isn't applicable to mouselook or cases
where the pointer is locked because the application is drawing its own
cursor while covering vscreen, so it can be ignored during pointer lock.
--
v2: winewayland: Ignore absolute motion during pointer lock.
winewayland: Ignore enter motion during pointer lock.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7457
--
v4: dmsynth/tests: Test DirectMusicSynth class in isolation.
dmsynth/tests: Test DirectMusicSynthSink class in isolation.
dmsynth/tests: Import and use a check_interface helper.
dmsynth/tests: Avoid dynamic format string.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3675
On Sun Mar 9 00:12:08 2025 +0000, Shengyu Qu wrote:
> SD/HD difference not only exists in NV cards, AMD/Intel GPU also have
> similar settings in their control panel(But not in Intel GPU +
> eDP/TypeC/Thunderbolt panels: https://github.com/IGCIT/Intel-GPU-Community-Issue-Tracker-IGCIT/issues/878)
@Stat_headcrabbed The SD/HD reference here refers to the BT.601 and BT.709 color spaces. BT.601 was designed for CRT and is considered the standard for SD (images that are 720 x 576 or less). BT.709 on the other hand was designed for LCD. But both of these color standards use the limited range Y'CrCb values and thus need to be expanded to full range RGB (as the rest of the graphics stack writing to an RGB texture will use full range).
The color depth setting from the graphics card control panel will then determine what is sent to the monitor. So this change won't impact that. It's just making sure the value for black from a video matches the value of black from, for example, a shader.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7416#note_97223
PathRemoveFileSpecW keeps only the drive if the path contains all forward slashes as shown in tests.
But then the temporary file is created in the root folder which fails for drive Z:.
This fixes a corner case when using CMake in Wine. Another usage of PathRemoveFileSpecW is in PathRelativePathToW which should be also checked.
I'm leaving this as a draft until getting some feedback and adding tests.
--
v3: kernelbase: Handle correctly paths with forward slashes in ReplaceFileW.
kernel32: Test ReplaceFileW with forward slashes.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7290
PathRemoveFileSpecW keeps only the drive if the path contains all forward slashes as shown in tests.
But then the temporary file is created in the root folder which fails for drive Z:.
This fixes a corner case when using CMake in Wine. Another usage of PathRemoveFileSpecW is in PathRelativePathToW which should be also checked.
I'm leaving this as a draft until getting some feedback and adding tests.
--
v2: kernelbase: Handle correctly paths with forward slashes in ReplaceFileW.
kernel32: Test ReplaceFileW with forward slashes.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7290
This is the continuation of https://gitlab.winehq.org/wine/wine/-/merge_requests/7317.
There are a lot of smaller commits (some even no-op renames), because there are some inconsistencies in the codebase currently of what an NT thread priority vs a base thread priority should be and I hope that this clears that up a bit.
I tried making the commits as atomic as possible I hope this is fine... There are still a few tiny details missing like fixing up the `list_processes` request and `KeSetPriorityThread` and friends which are either stubs or not correctly working as well.
There are also probably a few tests that can be written here (after thread priority boosting has been disabled, cause that makes the behavior on windows very flaky and dynamic). In fact on windows there is some thread priority boost decay going on after the message has been processed (and probably other boosting mechanisms), which this MR does not properly capture, but are also probably not reasonable to implement.
This also reverts the commits of https://gitlab.winehq.org/wine/wine/-/merge_requests/1232, which are being effectively overwritten anyways.
The `get_thread_priority_info` request was added, because the reply in `get_thread_info` would be otherwise larger than 64 bytes, so it had to be split.
--
v6: ntdll/tests: Add tests for process and thread priority.
server, ntdll: Fetch both process priority and base_priority.
server: Add process base priority helper.
kernelbase: Use ProcessPriorityClass info class in GetPriorityClass.
kernelbase: Use correct priority in GetThreadPriority.
server, ntdll: Fetch both thread priority and base_priority.
server, ntdll: Move last thread information to get_thread_info flags.
ntdll: Implement ThreadPriority class in NtSetInformationThread.
server: Implement setting thread priority directly.
server: Add set_thread_priority helper.
server: Rename thread priority to base_priority.
server: Rename base_priority to effective_priority in apply_thread_priority.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7516
PathRemoveFileSpecW keeps only the drive if the path contains all forward slashes as shown in tests.
But then the temporary file is created in the root folder which fails for drive Z:.
This fixes a corner case when using CMake in Wine. Another usage of PathRemoveFileSpecW is in PathRelativePathToW which should be also checked.
I'm leaving this as a draft until getting some feedback and adding tests.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7290
This is the continuation of https://gitlab.winehq.org/wine/wine/-/merge_requests/7317.
There are a lot of smaller commits (some even no-op renames), because there are some inconsistencies in the codebase currently of what an NT thread priority vs a base thread priority should be and I hope that this clears that up a bit.
I tried making the commits as atomic as possible I hope this is fine... There are still a few tiny details missing like fixing up the `list_processes` request and `KeSetPriorityThread` and friends which are either stubs or not correctly working as well.
There are also probably a few tests that can be written here (after thread priority boosting has been disabled, cause that makes the behavior on windows very flaky and dynamic). In fact on windows there is some thread priority boost decay going on after the message has been processed (and probably other boosting mechanisms), which this MR does not properly capture, but are also probably not reasonable to implement.
This also reverts the commits of https://gitlab.winehq.org/wine/wine/-/merge_requests/1232, which are being effectively overwritten anyways.
The `get_thread_priority_info` request was added, because the reply in `get_thread_info` would be otherwise larger than 64 bytes, so it had to be split.
--
v5: ntdll/tests: Add tests for process and thread priority.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7516