On Thu Jul 11 10:51:43 2024 +0000, Elizabeth Figura wrote:
> Sorry for the late approval; I missed that I had been assigned.
> As far as I can tell from the documentation this is correct and matches
> the semantics we need.
> There are a couple trailing whitespace errors in the last patch though.
No worries, and thanks the review!
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5237#note_75894
On Thu Jul 11 10:08:54 2024 +0000, Dmitry Timoshkov wrote:
> I'd suggest to add a test. That test most likely will show that
> GetUserNameEx(NameDisplay) returns an error ERROR_NONE_MAPPED on every
> VM in the Testbot. That means that your assumptions about
> GetUserNameEx() behaviour are incorrect, and the code in your plugin
> software won't work on at least some (I'd guess on most) of the Windows
> computers. Therefore your implementation is incorrect as well.
I will. Also, take a look at this:

--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6002#note_75893
On Thu Jul 11 09:52:04 2024 +0000, Egor Poleshko wrote:
> Nevermind, I apologise. I misunderstood how do the username values work
> on local accounts.
> From your and my observations, GetUserNameExW(3) performs several checks
> before returning a result:
> - If the user is connected to an Active Directory domain, return the
> `displayName` value from the domain LDAP database.
> - If the local user is linked to a Microsoft account, return the name
> specified in it.
> - Else, return `ERROR_NONE_MAPPED`.
> The Microsoft Account part is tricky, because, as far as I know, Wine
> doesn't provide a way to link the local user to a Microsoft account...
> Maybe, my implementation will suffice?
I'd suggest to add a test. That test most likely will show that GetUserNameEx(NameDisplay) returns an error ERROR_NONE_MAPPED on every VM in the Testbot. That means that your assumptions about GetUserNameEx() behaviour are incorrect, and the code in your plugin software won't work on at least some (I'd guess on most) of the Windows computers. Therefore your implementation is incorrect as well.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6002#note_75890
On Thu Jul 11 09:01:15 2024 +0000, Dmitry Timoshkov wrote:
> What do you mean?
Nevermind, I apologise. I misunderstood how do the username values work on local accounts.
From your and my observations, GetUserNameExW(3) performs several checks before returning a result:
- If the user is connected to an Active Directory domain, return the `displayName` value from the domain LDAP database.
- If the local user is linked to a Microsoft account, return the name specified in it.
- Else, return `ERROR_NONE_MAPPED`.
The Microsoft Account part is tricky, because, as far as I know, Wine doesn't provide a way to link the local user to a Microsoft account... Maybe, my implementation will suffice?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6002#note_75889
On Thu Jul 11 08:58:24 2024 +0000, Egor Poleshko wrote:
> Does the user on that computer have an offline display name?
> {width=318 height=100}
What do you mean?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6002#note_75886
On Tue Jul 9 18:18:29 2024 +0000, Egor Poleshko wrote:
> Hm, interesting. I'll experiment with this and make changes to my branch
> accordingly. Thank you.
Does the user on that computer have an offline display name?
{width=318 height=100}
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6002#note_75885
The handles returned by libproc (namely struct socket_info's soi_pcb)
use all 64 bits, but the ones from the pcblist sysctl are truncated
to 32. That makes find_owning_pid fail. The pcblist64 sysctl was
added in macOS 10.6 and returns handles that match those from
libproc.
--
There does not seem to be a MIB constant for pcblist64, so I had to fetch it with sysctlbyname.
--
v4: nsiproxy.sys: Use the pcblist64 sysctl to enumerate UDP connections on macOS.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6021
This fixes various corner cases.
This is not motivated by any particular application. However, the server-side
code seems at least as simple as the existing client-side code, is more
accurate, and removes a potential source of complication from any future work
involving asyncs.
--
v2: server: Reimplement mailslots using server-side I/O.
server: Treat completion with error before async_handoff() as error.
kernel32/tests: Add more mailslot tests.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6045
@tclem would you might providing a brief explanation on the thought process behind this?
In the usecase where the host has below 48bits of address space (commonly the case on arm64 linux kernels which might use 39bit or even 36bit address space) this results in the following similar lines of text being basically spammed in the log during process creation
```
002c:err:virtual:map_fixed_area out of memory for 0x6fffffcd0000-0x6ffffffef000
002c:err:virtual:try_map_free_area mmap() error Cannot allocate memory, range 0x7fffffcd0000-0x7ffffffef000, unix_prot 0x7.
```
Are 48bits of address space really a requirement for most applications and cause fatal errors without it?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3598#note_75871
--
v2: server: Skip inaccessible threads in (get_next_thread).
server: Do not allow zero access mask when opening some objects.
ntoskrnl.exe/tests: Open directory object with nonzero access in test_permanent().
ntdll/tests: Add tests for opening some objects with zero access.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6047
This is part XIX of cmd engine rewrite.
It's the last MR (for now) for setting success/failure
return code on internal commands.
The remaining todo in this area are due to:
- incompletly implemented builtin (eg: TYPE not handling
multiple files, not wildcards; CHOICE missing a bunch
of features; ...),
- some commands (like START) being implemented as external
executables, hence forcing RETURN CODE = ERRORLEVEL
which is not always wanted,
--
v2: cmd: Cleanup transition bits.
cmd: Improve return code/errorlevel support for external commands.
cmd: Move empty batch command handling to WCMD_batch() callers.
cmd: Set success/failure return code for START command.
cmd: Set success/failure return code for MKLINK command.
cmd: Add more tests for return codes in builtin commands.
cmd: Get rid of CTTY command.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6041
I'm not sure about the need for this solution, so it's a **DRAFT**. For me it is an academic interest to check whether atomic locks will give advantages over pthread_mutex in games. First impressions are that games have become smoother, but need to think about tests that can actually be measured.
Before build need define `WINE_USE_ATOMIC_LOCKS`.
```bash
export CFLAGS="${CFLAGS} -DWINE_USE_ATOMIC_LOCKS"
```
--
v4: ws2_32: Add atomic lock support.
wine32u: Add atomic lock support.
winevulkan: Add atomic lock support.
ntdll: Add atomic lock support.
winewayland: Add atomic lock support.
include: Define custom mutex macroses.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6031
I'm not sure about the need for this solution, so it's a **DRAFT**. For me it is an academic interest to check whether atomic locks will give advantages over pthread_mutex in games. First impressions are that games have become smoother, but need to think about tests that can actually be measured.
Before build need define `WINE_USE_ATOMIC_LOCKS`.
```bash
export CFLAGS="${CFLAGS} -DWINE_USE_ATOMIC_LOCKS"
```
--
v3: ws2_32: Add atomic lock support.
wine32u: Add atomic lock support.
winevulkan: Add atomic lock support.
ntdll: Add atomic lock support.
winewayland: Add atomic lock support.
include: Define custom mutex macroses.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6031
This fixes various corner cases.
This is not motivated by any particular application. However, the server-side
code seems at least as simple as the existing client-side code, is more
accurate, and removes a potential source of complication from any future work
involving asyncs.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6045
That seems to fix some (difficult to reproduce) crashes in EA Desktop / CEF, usually on shutdown but sometimes during starting up.
Currently TpSetWait can set (or clear) the event, while waitqueue_thread_proc() gets woken from NtWaitForMultipleObjects by previously set wait object and call the callback as if new set (or cleared) wait object is signaled. The crashes I was reproducing were always happening when RtlDeregisterWaitEx call is racing with waking the wait and calling the callback.
--
v2: ntdll: Make sure wakeups from already unset events are ignored in waitqueue_thread_proc().
https://gitlab.winehq.org/wine/wine/-/merge_requests/5044
This also bumps the minimum supported version of macOS to 10.12 to unconditionally assume the ulock syscalls are present.
As discussed with @Gcenx this shouldn't be an issue, as the current minimum support version of 10.8 does not work anyways at the moment with only 10.10+ being useable and even then virtually no-one using wine on versions < 10.12 (and also being unsupported by the prebuilt binaries).
Bumping to 10.12 would also have the side-benefit of allowing some cleanup of deprecated functions or legacy codepaths (like `mach_continuous_time` vs `mach_absolute_time` and probably much more).
In my testing ulock futexes are about 2x faster for synchronization than kevents. Using the syscall wrappers here should provide protection against changing syscall numbers, and given that ulock is also directly used by libc++, the probability of an incompatible API change here is basically zero imo.
By default ulock is also process-private, similar to the current linux implementation, cross-process synchronization would require darwin 19+ (macOS 10.15+) with `UL_COMPARE_AND_WAIT_SHARED`.
The diff is a bit bigger than it actually is in effect, since https://gitlab.winehq.org/mzent/wine/-/commit/28a8a991c165f0d37dbf78ca3cdee… is only moving some code around and not actually changing anything.
--
v4: ntdll: Implement futex_wait() and futex_wake_one() on macOS.
ntdll: Simplify futex interface from futex_wake() to futex_wake_one().
ntdll: Use USE_FUTEX to indicate futex support.
ntdll: Prefer futex for thread-ID alerts over kqueue.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5237
This is part XIX of cmd engine rewrite.
It's the last MR (for now) for setting success/failure
return code on internal commands.
The remaining todo in this area are due to:
- incompletly implemented builtin (eg: TYPE not handling
multiple files, not wildcards; CHOICE missing a bunch
of features; ...),
- some commands (like START) being implemented as external
executables, hence forcing RETURN CODE = ERRORLEVEL
which is not always wanted,
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6041
And use new bindings for more MSHTML objects.
--
v2: mshtml: Use host object script bindings for Performance class.
mshtml: Use host object script bindings for PerformanceTiming class.
mshtml: Use host object script bindings for PerformanceNavigation class.
mshtml: Use host object script bindings for History class.
mshtml: Use host object script bindings for DOMImplementation class.
mshtml/tests: Make todo_wine explicit in builtin_toString tests.
jscript: Add support for host functions.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6039
On Mon Jul 8 21:43:03 2024 +0000, Etaash Mathamsetty wrote:
> cracked the mystery, im pretty sure AUDCLNT_STREAMFLAGS_RATEADJUST is
> needed for GetService to work :)
This explains things, thanks! I'll amend the tests and add support in `GetService()`.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5585#note_75784
On Tue Jul 9 19:55:30 2024 +0000, Davide Beatrici wrote:
> Since the operations are more or less the same as in
> `pulse_create_stream()`, could you create a helper function in a
> separate commit (that will be first in the list), please?
I've been looking into this when originally implementing the function. I had another look now.
The only shared parts that I think we could extract are
```c
new_bufsize_frames = ceil((stream->duration / 10000000.) * new_ss.rate);
size = new_bufsize_frames * 2 * pa_frame_size(&stream->ss);
if (NtAllocateVirtualMemory(GetCurrentProcess(), (void **)&new_buffer, zero_bits, &size, MEM_COMMIT, PAGE_READWRITE))
hr = E_OUTOFMEMORY;
```
but I couldn't make it not overly awkward, mostly because of when the variables have to be set and the failure paths / cleanup. I can do two helpers, one for `bufsize_frames` and `size` each unless you have a more detailed suggestion.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5585#note_75783
I'm not sure about the need for this solution, so it's a **DRAFT**. For me it is an academic interest to check whether atomic locks will give advantages over pthread_mutex in games. First impressions are that games have become smoother, but need to think about tests that can actually be measured.
Before build need define `WINE_USE_ATOMIC_LOCKS`.
```bash
export CFLAGS="${CFLAGS} -DWINE_USE_ATOMIC_LOCKS"
```
--
v2: ws2_32: Add atomic lock support.
wine32u: Add atomic lock support.
winevulkan: Add atomic lock support.
ntdll: Add atomic lock support.
winewayland: Add atomic lock support.
include: Define custom mutex macroses.
msxml3: Fix compilation errors with Clang 18.
configure: Change C standard to C17.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6031
First part of a series introducing a separate unix interface for the MF media source. The goal is to use a synchronous demuxing-only interface, similar to native, which will be simpler and faster and better fitted to most MF media source use cases.
--
v2: winegstreamer/media_source: Handle GST_QUERY_SCHEDULING on wg_source src pad.
winegstreamer/media_source: Handle GST_QUERY_DURATION on wg_source src pad.
winegstreamer/media_source: Handle GST_QUERY_URI on wg_source src pad.
winegstreamer/media_source: Push a stream and segment event to the wg_source.
winegstreamer/media_source: Create a demuxer element in wg_source_create.
winegstreamer/media_source: Create a source pad on the wg_source.
winegstreamer/media_source: Prefer MF_BYTESTREAM_ORIGIN_NAME for source URL.
winegstreamer/media_source: Provide first block of data and stream URL to wg_source.
winegstreamer/media_source: Call (Begin|End)Read to read the byte stream header.
winegstreamer/media_source: Introduce a new wg_source interface.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5998
This is the first batch of a series implementing faster media source resolution required to workaround an Unreal Engine race condition present in some games, and deterministic stream ordering that decodebin / parsebin cannot provide, which is required to expose the streams in native order, for compatibility in several other applications.
I pushed the full series as a branch here: https://gitlab.winehq.org/rbernon/wine/-/commits/mr/wg-source-part-one
Note that this full series is also a first step in the direction of having a simpler demuxer interface, which will be required in the future for compatibility with applications that build MF or DirectShow pipelines directly and expect the relevant components to behave as a demuxer and expose compressed media types. For now it only delays the use of wg_parser to whenever the media source is started, and matches the non-ordered streams using their media types and tags. This is a best effort solution but I don't think we can do much better for the moment.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3606
--
v2: winegstreamer: Expose the generic video decoder transform.
winegstreamer: Introduce a generic audio decoder transform.
winegstreamer: Rename aac_decoder to audio_decoder.
winegstreamer: Translate generic unknown audio / video media types.
winegstreamer: Support generic audio / video unknown formats.
winegstreamer: Call gst_video_info_from_caps for all video formats.
winegstreamer: Call gst_audio_info_from_caps for all audio formats.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5138
I'm not sure about the need for this solution, so it's a **DRAFT**. For me it is an academic interest to check whether atomic locks will give advantages over pthread_mutex in games. First impressions are that games have become smoother, but need to think about tests that can actually be measured.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6031
The sequence lives in the object header, and the object is containing
the shm struct. The code was reading before the dummy_shm variable and
sometimes asserted that the sequence isn't initialized to zero.
Fixes a random wineserver crash, sorry about that.
--
v2: server: Use a shared_object_t for the dummy object.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6037
The sequence lives in the object header, which is containing the shm
struct. The code was reading before the dummy_shm variable and sometimes
asserted that the sequence isn't initialized to zero.
Fixes a random wineserver crash, sorry about that.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6037
On Thu Jun 27 01:11:28 2024 +0000, Zhiyi Zhang wrote:
> > It fails on asserting return value of sending LVM_GETNEXTITEM message
> In that case, please also add a test checking the same thing.
Hi, could you add a test?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5909#note_75710
Same bug class as https://gitlab.winehq.org/wine/wine/-/merge_requests/5550.
None of them are referenced by anything (not counting mfplat/main.c's debugstr_attr(), which names the two in mfapi.h - better debug output, yay I guess).
--
v6: include: Fix typoed value of CLSID_WICXMPMetadataReader.
include: Fix typoed value of MEDIASUBTYPE_P408.
include: Fix typoed values of IID_IPropertyEnumType2 and CLSID_PropertySystem.
include: Fix typoed values of IID_IMimeWebDocument and IID_IMimeMessageCallback.
include: Fix typoed values of MF_MT_VIDEO_3D and MF_MT_AUDIO_FOLDDOWN_MATRIX.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5559
Same bug class as https://gitlab.winehq.org/wine/wine/-/merge_requests/5550.
None of them are referenced by anything (not counting mfplat/main.c's debugstr_attr(), which names the two in mfapi.h - better debug output, yay I guess).
--
v5: include: Fix typoed value of CLSID_WICXMPMetadataReader.
include: Fix typoed value of MEDIASUBTYPE_P408.
include: Fix typoed values of IID_IPropertyEnumType2 and CLSID_PropertySystem.
include: Fix typoed values of IID_IMimeWebDocument and IID_IMimeMessageCallback.
include: Fix typoed values of MF_MT_VIDEO_3D and MF_MT_AUDIO_FOLDDOWN_MATRIX.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5559
On Tue Jul 9 18:18:30 2024 +0000, Dmitry Timoshkov wrote:
> Hans is correct. I have a computer that is part of the AD domain, and
> before logging into the domain GetUserNameEx(3) returns error 1332
> (ERROR_NONE_MAPPED). After entering the domain GetUserNameEx(3) returns
> name that is equal to the displayName field in the LDAP database.
> Behaviour is the same for Windows 7 and Windows 10.
Hm, interesting. I'll experiment with this and make changes to my branch accordingly. Thank you.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6002#note_75599
The handles returned by libproc (namely struct socket_info's soi_pcb)
use all 64 bits, but the ones from the pcblist sysctl are truncated
to 32. That makes find_owning_pid fail. The pcblist64 sysctl was
added in macOS 10.6 and returns handles that match those from
libproc.
--
There does not seem to be a MIB constant for pcblist64, so I had to fetch it with sysctlbyname.
--
v2: nsiproxy.sys: Use net.inet.tcp.pcblist64 to enumerate connections on macOS.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6021
On Tue Jul 9 16:44:32 2024 +0000, Tim Clem wrote:
> Whoa, whoops. Thanks, missed that when I was cleaning up the patch. I'm
> now caching the mib, which cleans things up a bit as well.
Also added the UDP version while I'm at it.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6021#note_75586
This MR adds a very minimal support for new MSHTML objects bindings that will ultimately allow implementing IE9+ behavior. The plan is to have something testable that we can increment on. It's enabled only for the `Screen` object for now (which is an example of an object without custom properties with no functions). The next step is to work incrementally on enabling it for all MSHTML objects.
A few comments on the approach:
- The object and its jscript representation share reference counter. This may not be optimal, but it essentially preserves the current behavior where MSHTML is responsible for tracking it. I expect that we will want to revisit that when integrating cycle collector with jscript.
- Deleting properties is not yet supported; this will need another function in the interface, but it's not yet needed as we currently don't allow deleting builtin properties anyway (and custom properties are skipped in this MR as they are not needed for the `Screen` object).
- Functions are not yet supported, only old-style properties (not accessor properties yet). They are straightforward to support on top of it by extending `property_info` struct to pass iid and implementing them as jscript function.
- This does not yet allow host properties to appear and disappear without notifications. This is a limitation of jscript's `dispex.c` (not the interface), which will need to be tweaked before we use new bindings for objects that require it.
--
v2: mshtml: Use IWineJSDispatch for screen object script bindings.
mshtml: Support using IWineJSDispatch for DispatchEx implementation.
mshtml: Pass an optional script global window to init_dispatch.
mshtml: Implement jscript IWineJSDispatchHost.
jscript: Use jsdisp_t internally for host objects that support it.
jscript: Support host objects in disp_cmp.
jscript: Support converting host objects to string.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6029
This MR adds a very minimal support for new MSHTML objects bindings that will ultimately allow implementing IE9+ behavior. The plan is to have something testable that we can increment on. It's enabled only for the `Screen` object for now (which is an example of an object without custom properties with no functions). The next step is to work incrementally on enabling it for all MSHTML objects.
A few comments on the approach:
- The object and its jscript representation share reference counter. This may not be optimal, but it essentially preserves the current behavior where MSHTML is responsible for tracking it. I expect that we will want to revisit that when integrating cycle collector with jscript.
- Deleting properties is not yet supported; this will need another function in the interface, but it's not yet needed as we currently don't allow deleting builtin properties anyway (and custom properties are skipped in this MR as they are not needed for the `Screen` object).
- Functions are not yet supported, only old-style properties (not accessor properties yet). They are straightforward to support on top of it by extending `property_info` struct to pass iid and implementing them as jscript function.
- This does not yet allow host properties to appear and disappear without notifications. This is a limitation of jscript's `dispex.c` (not the interface), which will need to be tweaked before we use new bindings for objects that require it.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6029
Hans is correct. I have a computer that is part of the AD domain, and before logging into the domain GetUserNameEx(3) returns error 1332 (ERROR_NONE_MAPPED). After entering the domain GetUserNameEx(3) returns name that is equal to the displayName field in the LDAP database. Behaviour is the same for Windows 7 and Windows 10.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6002#note_75556
This is part XVIII of cmd engine rewrite.
It mainly focuses on setting the expected return code for
some builtin functions.
Includes also a fix for pipe inside a redirection (spotted by
the added tests).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6028
This MR adds support for creating file mapping objects backed by large pages on Linux, by making the following changes:
## wineserver
* On Linux, `create_temp_file` will first attempt to use memfds as the backing fd. If it fails, it'll return to the current codepath, creating a temporary file in either the server or config directory.
* The created memfd will be sealed against writes, if the caller requesting the appropriate page protection flags.
* This removes the requirement that FDs be only created on filesystems/directories that aren't `noexec`.
* In the server method `create_mapping` , if large pages have been requested by the caller, hold that the calling thread's token holds `SeLockMemoryPrivilege` .
* Additionally, add `SeLockMemoryPrivilege` to the list of privileges enabled for the Administrator.
## `ntdll`
* Add `virtual_get_min_large_page_size` and its exported wrapper `wine_unix_get_min_large_page_size`.
* On Linux, the minimum page size is determined by going through `/sys/kernel/mm/hugepages`. If hugepage support was not detected, `STATUS_NOT_SUPPORTED` is returned instead. On other platforms, the older hard-coded value of 2\*1024\*1024 is returned instead.
* `NtCreateSection` will validate certain parameters if large pages are requested. Specifically, it will return STATUS_INVALID_PARAMETER if the requested mapping is not anonymous/unnamed, or the size is not a multiple of the minimum supported page size.
## `kernelbase`
* `GetLargePageMinimum` will use `wine_unix_get_min_large_page_size`.
## `kernel32/tests`
* Add new test test_large_page_file_mapping, which validates privilege enforcements and parameter validation while creating large pages backed file mapping obejcts. The tests are skipped if `GetLargePageMinimum` returns 0.
--
v35: advapi32: Fake the SeLockMemoryPrivilege right in LsaEnumerateAccountRights.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5769
I was hoping that the new tests would provide evidence that RtlQueryRegistryValues uses RegGetValue to ensure that multi-strings are double-null-terminated. Instead the tests suggest that my hypothesis was wrong because RegGetValue only ensures single null termination, not double null termination. We should fix RegGetValue anyway for the sake of applications that expect it to null-terminate.
--
v9: kernelbase: Ensure null termination in RegGetValue[AW].
https://gitlab.winehq.org/wine/wine/-/merge_requests/5969
I was hoping that the new tests would provide evidence that RtlQueryRegistryValues uses RegGetValue to ensure that multi-strings are double-null-terminated. Instead the tests suggest that my hypothesis was wrong because RegGetValue only ensures single null termination, not double null termination. We should fix RegGetValue anyway for the sake of applications that expect it to null-terminate.
--
v8: kernelbase: Ensure null termination in RegGetValue[AW].
https://gitlab.winehq.org/wine/wine/-/merge_requests/5969
In my tests GetUserNameEx(NameDisplay) returns ERROR_NONE_MAPPED on Windows. It seems that the Windows machine needs to be joined to a Windows domain for this call to return something sensible. Do you have an application that depends this?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6002#note_75538
The handles returned by libproc (namely struct socket_info's soi_pcb)
use all 64 bits, but the ones from the pcblist sysctl are truncated
to 32. That makes find_owning_pid fail. The pcblist64 sysctl was
added in macOS 10.6 and returns handles that match those from
libproc.
--
There does not seem to be a MIB constant for pcblist64, so I had to fetch it with sysctlbyname.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6021
I was hoping that the new tests would provide evidence that RtlQueryRegistryValues uses RegGetValue to ensure that multi-strings are double-null-terminated. Instead the tests suggest that my hypothesis was wrong because RegGetValue only ensures single null termination, not double null termination. We should fix RegGetValue anyway for the sake of applications that expect it to null-terminate.
--
v10: kernelbase: Ensure null termination in RegGetValue[AW].
https://gitlab.winehq.org/wine/wine/-/merge_requests/5969