On Windows it seems sending to port 0 does nothing and does not error.
Presently sendmsg errors with EINVAL.
This works around it, by checking if it's port 0 then skipping the data.
--
v22: ntdll: Do not send data to port 0.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2100
While working in vbscript, I noticed abs on a `BSTR` value with a positive number would come back with an invalid value.
Given the following script:
```
Dim x
x = "30000"
Debug.Print "x" & "=" & abs(x)
```
Outputs:
```
Script.Print 'x=3.08221696253945E-314'
```
After debugging, `pVarIn` gets the R8 value but is never shallow copied into `pVarOut`.
In addition to a test case in `oleaut32`, I've included a test case in `vbscript`.
This fixes bug: https://bugs.winehq.org/show_bug.cgi?id=54489
--
v9: oleaut32: fix VarAbs function for BSTR with positive values
https://gitlab.winehq.org/wine/wine/-/merge_requests/2175
Zebediah Figura (@zfigura) commented about dlls/ntdll/unix/socket.c:
> {
> ULONG_PTR information;
>
> - status = try_send( fd, async );
> + if (protocol == WS_IPPROTO_UDP && async->addr && sockaddr_is_port0(async->addr, async->addr_len))
> + {
> + /* Spellforce 3 is known to send to port 0.
> + * This causes 'sendmsg' to throw a EINVAL error, on Windows this does nothing but consume the data.
> + */
> + ssize_t i;
> + for(i = async->iov_cursor; i < async->count; i++)
> + {
> + async->sent_len += async->iov[i].iov_len;
> + }
```suggestion:-3+0
for (i = async->iov_cursor; i < async->count; i++)
async->sent_len += async->iov[i].iov_len;
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2100#note_24096
Not completely sure if it's worth having for 8.0, but opening this to share the target I'm trying to reach.
--
v11: ntdll: Add a heap thread affinity and per-affinity bin group cache.
ntdll: Use atomics and lock-free list for bin groups.
ntdll: Implement Low Fragmentation Heap frontend.
ntdll: Split heap_resize_block into heap_resize_(block|large) helpers.
ntdll: Count allocations and automatically enable LFH.
ntdll: Increase heap block tail_size capacity to 16 bits.
ntdll: Implement HeapCompatibilityInformation.
ntdll: Fix HeapWalk with empty uncommitted consecutive subheaps.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1628
On Tue Feb 14 16:20:32 2023 +0000, Jacek Caban wrote:
> This will work, but while reviewing this I noticed that current handling
> of VT_R4 and VT_R8 is not exactly right, overflow checks don't really
> make sense. Fixing that allows to simplify VT_BSTR case a bit. Please
> take a look at https://gitlab.winehq.org/jacek/wine/-/commits/varabs/
> and if it looks good to you, update MR with that branch (it also
> contains BSTR allocation fixup).
Thanks. Hopefully I rebased properly!
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2175#note_24086