The prefix of patch 1/2 should be changed to "ws2_32/tests". The subject is not quite a grammatical sentence; I'd just write "Check if sending to port 0 succeeds."
> + char buf[12] = "hello world";
No reason to specify the buffer size; you can just write "char buf[]".
> + DWORD bytesSent = 0;
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2100#note_23489
QueryInterface should set *out to NULL on failure, as it seems to do in many different places.
This seems to be a regression from !888.
One old game started to crash on startup with this merge request.
I bisected it and it pointed to the commit 131ada052a2dbec66df695ce536ca048a2bd9174.
--
v4: wmvcore/tests: check out value for NULL in check_interface
https://gitlab.winehq.org/wine/wine/-/merge_requests/2130
On Wed Feb 8 19:01:54 2023 +0000, **** wrote:
> Paul Gofman replied on the mailing list:
> ```
> On 2/8/23 12:55, Rémi Bernon (@rbernon) wrote:
> >
> > USR1 / USR2 / INT for instance could be blocked in non-Wine threads,
> raising them again until they reach a Wine thread.
> I think USR1 may only be received by a non-Wine thread if it was
> originated by some native library and not by wineserver which sends that
> only to threads it knows? In that case, not sure how that can be handled
> better in a Wine thread?
> Also, is there a good way to block signals in threads which are created
> by native libraries, I think we don't know anything about those threads?
> ```
Yes, what Paul said. If a non-Wine thread gets USR1 or USR2 it didn't come from us, and handing it to a Wine thread is not going to do the right thing.
Note that signal masks are per-thread, but according to my understanding signal *actions* aren't.
QUIT is supposed to kill the entire process by default, not just a thread, so just killing that thread doesn't seem right. I suppose we *could* exit() in that case, but QUIT also dumps core by default, so it doesn't seem quite right to do a clean exit either. At least not right enough to be worth the extra complexity.
Rethrowing INT to a Wine thread is... nontrivial, but possible, I guess? I'd rather leave it for a follow-up patch if it's really worth doing.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2126#note_23484