1. Subtracting integers may result in an overflow or underflow.
2. Right at the 'edge' of underflowing, the result of subtraction may be
`INT_MIN`, and the call to `abs()` will also result in `INT_MIN`.
This fix accounts for all of these conditions.
EXAMPLES:
1. can be encountered by comparing 2.0 and -2.0
2. can be encountered by comparing -2.0 and 2.0
NOTE:
There are 14 more instances of `compare_float` across several modules.
I would like to make sure the logic is sound with this MR, then I can take on the rest.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3458
This is probably the most ugly and controversial bit of API. I don't really know
if this is the right approach to solving this.
sm4 registers match by register index, such that shaders can mostly be compiled
in isolation. sm1 does not—registers may be specified in any order in the vertex
and pixel shaders, and will be matched by usage and usage index.
By itself this is not much of a problem. Where it gets hairy is that we want to
do some degree of caching, as well as pre-compilation, and avoid recompiling
either shader every time it's matched with a new one.
Wine currently deals with this problem, for GLSL, by generating a "main" GLSL
shader for the vertex shader, and then an extra function setup_vs_output(), and
linking the two together every time a new pixel shader is used. This could in
theory be used for SPIR-V, but it requires the use of extra, probably external,
code to link SPIR-V shaders together, which I do not particularly anticipate
being well-received.
(I'm not sure how Wine deals with this problem in the ARB backend. It seems to
take the pixel shader signature into account when generating the vertex shader—
cf. init_output_registers()—but it doesn't take it into account when looking up
a vertex shader variant? I didn't look too closely at the code, so maybe I'm
missing something.)
--
The vkd3d parts of this patch are quite straightforward, and looking at them, I
think the design is quite intuitive in isolation. There may be some room for
internal refactoring (in particular with an eye to not so much overloading
the "register_index" field of struct shader_signature_element) but I'm
relatively happy with the way it turned out. In isolation, that is.
The Wine part is worse. I've uploaded branches for vkd3d and Wine that use this
API, and correctly handle shaders with some nontrivial reordering:
https://gitlab.winehq.org/zfigura/vkd3d/-/commits/himavant5https://gitlab.winehq.org/zfigura/wine/-/commits/himavant_cb
The test can be run, as before, like so:
make tests/shader_runner.exe && WINE_D3D_CONFIG=renderer=vulkan wine tests/shader_runner.exe ../vkd3d/tests/hlsl/sm1-interstage-interface.shader_test
The interesting Wine parts are concentrated in a single patch, 5cfb9d930f11e.
The patch takes a few shortcuts, partly because I wanted not to block the vkd3d
API design questions, but also because while writing it I came up with a couple
of problems that I wasn't sure how to fix. There are two main problems I see:
(1) This patch has the user pass the signature from the pixel shader when
compiling the vertex shader, and looks up register indices already
arbitrarily allocated by the pixel shader. This is problematic when trying
to use this signature as a cache key, by virtue of it not being clear (or
even defined) which fields are key elements and which aren't. It's also not
particularly kind to lookup, on account of not being directly comparable
with memcmp(). There are a few options I see:
(a) Provide an internal function to compare key elements. This feels... odd,
like a very special-purpose function, but perhaps workable.
(b) Just make the user deal with it, and assert that all fields are key
elements.
(c) Use some alternative, perhaps shortened structure as a field of
vkd3d_shader_next_stage_info. This has the disadvantage that it is not
as simple for a hypothetical user to retrieve from the pixel shader, but
we would presumably provide a function to generate one from a shader
signature. This would probably also be kinder to cache lookup if it's
shorter.
(d) Make caching vkd3d's responsibility, to some degree. This seems
daunting, but the more we optimize, the more difficult it may be to
design API that allows for nice caching.
(2) Assuming we use signatures, there is a memory management problem that
5cfb9d930f11e spells out. This is probably a matter of "just fix it", but
I suppose another option is to take the GLSL or ARB architecture.
--
April is the cruellest month, breeding
Lilacs out of the dead land, mixing
Memory and desire, stirring
Dull roots with spring rain.
--
v5: vkd3d-shader: Introduce a function to build a varying map between sm1 stages.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/280
Builtin gdiplus behaves as documented but tests are indicating that Windows behaviour sometimes differs from the documentation.
I believe this issue is at least one of the contributing issues to bug https://bugs.winehq.org/show_bug.cgi?id=46947, if not the sole issue. I propose that this flag be disabled until it is well understood. I noticed as issue with DrawString seeming to ignore the flag sometimes(sometimes the text fits without any noticeable defects which I believe is the case with the program in the bug) and sometimes even drawing clipped text with the flag on. Other times it works as expected. I can't seem to find a pattern to identify that could be used to predict its behaviour.
Signed-off-by: David Kahurani k.kahurani(a)gmail.com
--
v4: gdiplus: Fix StringFormatFlagsLineLimit handling
https://gitlab.winehq.org/wine/wine/-/merge_requests/3407
--
v2: vkd3d-shader/tpf: Check buffer->status in add_section().
vkd3d-shader/d3dbc: Return ctx->result from hlsl_sm1_write().
vkd3d-shader/d3dbc: Free vkd3d_bytecode_buffer data on failure.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/288
This is probably the most ugly and controversial bit of API. I don't really know
if this is the right approach to solving this.
sm4 registers match by register index, such that shaders can mostly be compiled
in isolation. sm1 does not—registers may be specified in any order in the vertex
and pixel shaders, and will be matched by usage and usage index.
By itself this is not much of a problem. Where it gets hairy is that we want to
do some degree of caching, as well as pre-compilation, and avoid recompiling
either shader every time it's matched with a new one.
Wine currently deals with this problem, for GLSL, by generating a "main" GLSL
shader for the vertex shader, and then an extra function setup_vs_output(), and
linking the two together every time a new pixel shader is used. This could in
theory be used for SPIR-V, but it requires the use of extra, probably external,
code to link SPIR-V shaders together, which I do not particularly anticipate
being well-received.
(I'm not sure how Wine deals with this problem in the ARB backend. It seems to
take the pixel shader signature into account when generating the vertex shader—
cf. init_output_registers()—but it doesn't take it into account when looking up
a vertex shader variant? I didn't look too closely at the code, so maybe I'm
missing something.)
--
The vkd3d parts of this patch are quite straightforward, and looking at them, I
think the design is quite intuitive in isolation. There may be some room for
internal refactoring (in particular with an eye to not so much overloading
the "register_index" field of struct shader_signature_element) but I'm
relatively happy with the way it turned out. In isolation, that is.
The Wine part is worse. I've uploaded branches for vkd3d and Wine that use this
API, and correctly handle shaders with some nontrivial reordering:
https://gitlab.winehq.org/zfigura/vkd3d/-/commits/himavant5https://gitlab.winehq.org/zfigura/wine/-/commits/himavant_cb
The test can be run, as before, like so:
make tests/shader_runner.exe && WINE_D3D_CONFIG=renderer=vulkan wine tests/shader_runner.exe ../vkd3d/tests/hlsl/sm1-interstage-interface.shader_test
The interesting Wine parts are concentrated in a single patch, 5cfb9d930f11e.
The patch takes a few shortcuts, partly because I wanted not to block the vkd3d
API design questions, but also because while writing it I came up with a couple
of problems that I wasn't sure how to fix. There are two main problems I see:
(1) This patch has the user pass the signature from the pixel shader when
compiling the vertex shader, and looks up register indices already
arbitrarily allocated by the pixel shader. This is problematic when trying
to use this signature as a cache key, by virtue of it not being clear (or
even defined) which fields are key elements and which aren't. It's also not
particularly kind to lookup, on account of not being directly comparable
with memcmp(). There are a few options I see:
(a) Provide an internal function to compare key elements. This feels... odd,
like a very special-purpose function, but perhaps workable.
(b) Just make the user deal with it, and assert that all fields are key
elements.
(c) Use some alternative, perhaps shortened structure as a field of
vkd3d_shader_next_stage_info. This has the disadvantage that it is not
as simple for a hypothetical user to retrieve from the pixel shader, but
we would presumably provide a function to generate one from a shader
signature. This would probably also be kinder to cache lookup if it's
shorter.
(d) Make caching vkd3d's responsibility, to some degree. This seems
daunting, but the more we optimize, the more difficult it may be to
design API that allows for nice caching.
(2) Assuming we use signatures, there is a memory management problem that
5cfb9d930f11e spells out. This is probably a matter of "just fix it", but
I suppose another option is to take the GLSL or ARB architecture.
--
April is the cruellest month, breeding
Lilacs out of the dead land, mixing
Memory and desire, stirring
Dull roots with spring rain.
--
v4: vkd3d-shader: Introduce a function to build a varying map between sm1 stages.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/280
Windows 10 [received support](https://devblogs.microsoft.com/commandline/af_unix-comes-to-window… for AF_UNIX sockets in Insider Build 17063. This merge request adds basic support for AF_UNIX sockets to ws2_32 and wineserver.
Of particular note is the difficulty in handling `sun_path`. Most of the functions that allow for translating Windows paths to Unix paths are not accessible from ws2_32. I considered the following options:
* Pass the Windows path to wineserver and do the conversion there.
* This is, as far as I can tell, not possible without major rearchitecting. wineserver does not have functions to translate Windows paths to Unix paths, for obvious reasons.
* Obtain the current working directory of the requesting process and temporarily change directories to there.
* This only handles relative paths and fails for absolute paths, UNC paths, etc.
* Conditionally change directories based on whether the path is relative or not.
* This is error-prone and wineserver does not have the requisite functions to do this cleanly.
I ultimately decided to pass the translated Unix path to wineserver, which changes directories to `dirname(path)`. It then provides `bind` and `connect` with `basename(path)`. This is not threadsafe, but wineserver is not (currently) multithreaded.
Abstract sockets are not fully supported by this patch, matching the behavior of Windows.
--
v46: ws2_32/tests: Add test for AF_UNIX sockets fix.
server: Fix getsockname() and accept() on AF_UNIX sockets.
server: Introduce error when attempting to create a SOCK_DGRAM AF_UNIX socket.
server: Allow for deletion of socket files.
ws2_32: Add support for AF_UNIX sockets.
ntdll/unix: Add support for AF_UNIX sockets to multiple functions.
ws2_32: Add afunix.h header.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2786
This is probably the most ugly and controversial bit of API. I don't really know
if this is the right approach to solving this.
sm4 registers match by register index, such that shaders can mostly be compiled
in isolation. sm1 does not—registers may be specified in any order in the vertex
and pixel shaders, and will be matched by usage and usage index.
By itself this is not much of a problem. Where it gets hairy is that we want to
do some degree of caching, as well as pre-compilation, and avoid recompiling
either shader every time it's matched with a new one.
Wine currently deals with this problem, for GLSL, by generating a "main" GLSL
shader for the vertex shader, and then an extra function setup_vs_output(), and
linking the two together every time a new pixel shader is used. This could in
theory be used for SPIR-V, but it requires the use of extra, probably external,
code to link SPIR-V shaders together, which I do not particularly anticipate
being well-received.
(I'm not sure how Wine deals with this problem in the ARB backend. It seems to
take the pixel shader signature into account when generating the vertex shader—
cf. init_output_registers()—but it doesn't take it into account when looking up
a vertex shader variant? I didn't look too closely at the code, so maybe I'm
missing something.)
--
The vkd3d parts of this patch are quite straightforward, and looking at them, I
think the design is quite intuitive in isolation. There may be some room for
internal refactoring (in particular with an eye to not so much overloading
the "register_index" field of struct shader_signature_element) but I'm
relatively happy with the way it turned out. In isolation, that is.
The Wine part is worse. I've uploaded branches for vkd3d and Wine that use this
API, and correctly handle shaders with some nontrivial reordering:
https://gitlab.winehq.org/zfigura/vkd3d/-/commits/himavant5https://gitlab.winehq.org/zfigura/wine/-/commits/himavant_cb
The test can be run, as before, like so:
make tests/shader_runner.exe && WINE_D3D_CONFIG=renderer=vulkan wine tests/shader_runner.exe ../vkd3d/tests/hlsl/sm1-interstage-interface.shader_test
The interesting Wine parts are concentrated in a single patch, 5cfb9d930f11e.
The patch takes a few shortcuts, partly because I wanted not to block the vkd3d
API design questions, but also because while writing it I came up with a couple
of problems that I wasn't sure how to fix. There are two main problems I see:
(1) This patch has the user pass the signature from the pixel shader when
compiling the vertex shader, and looks up register indices already
arbitrarily allocated by the pixel shader. This is problematic when trying
to use this signature as a cache key, by virtue of it not being clear (or
even defined) which fields are key elements and which aren't. It's also not
particularly kind to lookup, on account of not being directly comparable
with memcmp(). There are a few options I see:
(a) Provide an internal function to compare key elements. This feels... odd,
like a very special-purpose function, but perhaps workable.
(b) Just make the user deal with it, and assert that all fields are key
elements.
(c) Use some alternative, perhaps shortened structure as a field of
vkd3d_shader_next_stage_info. This has the disadvantage that it is not
as simple for a hypothetical user to retrieve from the pixel shader, but
we would presumably provide a function to generate one from a shader
signature. This would probably also be kinder to cache lookup if it's
shorter.
(d) Make caching vkd3d's responsibility, to some degree. This seems
daunting, but the more we optimize, the more difficult it may be to
design API that allows for nice caching.
(2) Assuming we use signatures, there is a memory management problem that
5cfb9d930f11e spells out. This is probably a matter of "just fix it", but
I suppose another option is to take the GLSL or ARB architecture.
--
April is the cruellest month, breeding
Lilacs out of the dead land, mixing
Memory and desire, stirring
Dull roots with spring rain.
--
v3: vkd3d-shader: Introduce a function to build a varying map between sm1 stages.
vkd3d-shader/spirv: Make output varyings not consumed by the next stage private variables.
vkd3d-shader: Implement remapping shader output registers to match the next shader's semantics.
vkd3d-shader: Add a separate field for the target location of a signature element.
vkd3d-shader/d3dbc: Make sure all inter-stage varyings have a unique register index.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/280
Mostly just a couple of style comments; feel free to disregard if you like:
The subject line, comments, and ok messages are missing full stops.
Personally, I'm not a fan of the switch/case style of tests. My preference would be to either just explicitly write out the tests, or to encode them using the "tests[]" construction we use in a couple of other tests.
> ```diff
> + static const D3D11_VIEWPORT viewport = {0, 0, 2, 1, 0, 1};
> ...
> + texture_desc.Width = (UINT)viewport.Width;
> + texture_desc.Height = (UINT)viewport.Height;
> ...
> + ID3D11DeviceContext_RSSetViewports(context, 1, &viewport);
> ```
That works, but more typically we'd initialise "texture_desc", and then call "set_viewport(..., texture_desc.Width, texture_desc.Height, ...)".
> ```diff
> + int test;
> ```
"test" can't be negative, right?
> ```diff
> + unsigned int i;
> + static const UINT vertex_stride = sizeof(depth_quarter_quad_data[0]);
> + static const UINT vertex_offset = 0;
> + static const struct vec4 initial_color = {0, 0, 0, 1};
> + static const float clear_color[] = {0, 1, 0, 1};
> + DWORD expected_color[] = {0xff000000, 0xff000000};
> + FLOAT expected_depth[] = {0.5f, 0.5f};
> ```
The choice for "FLOAT" seems odd, given that get_readback_float() returns a float. We don't tend to use UINT and DWORD a lot either.
> ```diff
> + for (i = 0; i < ARRAYSIZE(expected_color); i++)
> ```
It's not wrong, but all the existing code uses ARRAY_SIZE...
> ```diff
> + (!damavand && test == 3 && i == 0) /* Draw with no PS doesn't write color on D3D11 but does on OpenGL */
> ```
I don't think the comment is terribly clear, but it sounds like we're getting fixed-function with the GL backend, and things just happen to work with the Vulkan backend because we don't yet have a fixed-function implementation there. That likely won't last forever though. For comparison, vkd3d handles this explicitly in d3d12_pipeline_state_init_graphics().
> ```diff
> + ok(depth == expected_depth[i], "Test %d: Got unexpected depth %.2f at %u\n", test, depth, i);
> ```
I don't think %.2f is quite sufficient to show what's going on if the result is only off by a couple of ulps. That's perhaps not terribly likely for clears with carefully chosen depth values, but it still looks a little sketchy to me.
> ```diff
> +static void wined3d_context_prepare_used_framebuffer(struct wined3d_rendertarget_view *rtv, struct wined3d_context *context)
> +{
> + if (wined3d_rendertarget_view_get_locations(rtv) & WINED3D_LOCATION_CLEARED)
> + {
> + /* Need to rebind framebuffer or the clear won't happen */
> + context_invalidate_state(context, STATE_FRAMEBUFFER);
> + wined3d_rendertarget_view_prepare_location(rtv, context, rtv->resource->draw_binding);
> + }
> + else
> + {
> + wined3d_rendertarget_view_load_location(rtv, context, rtv->resource->draw_binding);
> + }
> +}
> ```
The comment doesn't seem quite as helpful as it perhaps could be; if I understand the issue correctly, we don't actually care about rebinding the framebuffer, but instead about starting a new render pass, because that's where we'll clear these. That's also what the commit message seems to suggest.
By convention, "context" would be the first parameter for wined3d_context_*() functions. The function name is also slightly odd, because it's preparing/loading individual views, not complete framebuffers.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3431#note_40852
Same as MR !2394
Signed-off-by: Zhao Yi zhaoyi(a)uniontech.com
--
v8: comctl32/listview: Reset bNoItemMetrics to TRUE to make sure that listview items can be arranged correctly.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3392
I'm not really sure if the last patch is the right way to fix the issue since I couldn't find where tls_w.c originates from.
--
v3: ldap: Free the output buffer after every InitializeSecurityContextA() call (Valgrind).
https://gitlab.winehq.org/wine/wine/-/merge_requests/3462
I'm not really sure if the last patch is the right way to fix the issue since I couldn't find where tls_w.c originates from.
--
v2: ldap: Free the output buffer after every InitializeSecurityContextA() call (Valgrind).
wldap32: Fix a message leak in ldap_parse_resultW() (Valgrind).
https://gitlab.winehq.org/wine/wine/-/merge_requests/3462
> moreover it means that we'd want two different behaviors when receiving SIGINT (whether it's a genuine unix signal or one sent by the server if we follow the tests result above) perhaps, the solution would be in the default_ctrl_handler to only terminate the program if attached to a console, or in the program group of a unix console
One way or another, terminating GUI process in response to Unix SIGINT is a Wine thing, it's not something we can express in Windows terms. If kernelbase part is not suitable, maybe we may just terminate process from ntdll when we're not connected to console. We know that in this case the signal originated from the host.
> remark: Wine unix console is the sole case where launching a GUI program from command line doesn't return immediately to prompt (native & builtin cmd implementation only wait on CUI programs completion). But that's conform to unix behavior.
I'm not sure what exactly you mean by conforming to unix behavior, but it's arguably a bug that will cause problems similar to !3145, under different conditions. I'd rather avoid depending on this behavior in the solution for SIGINT if possible.
> note: I'm not even sure tweeking with setsid whould be useful as anyway the unix console is in raw mode, so only conhost regenerates the signals
It's in raw mode only if a console application reads input. In this case, taking more control by conhost seems justified.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3312#note_40761
This get us pass the "Update your browser" blocker in adobe's sign-in page. The page itself doesn't make use of `window.MutationObserver`.
However the sign-in page is still broken.
--
v24: mshtml: add stubs for MutationObserver methods
mshtml: implement window.MutationObserver with MutationObserver stub
https://gitlab.winehq.org/wine/wine/-/merge_requests/3391
By default, synchronously completed socket operations will still send completions, we currently don't mind that in winhttp. The most essential part is patch 1, which will also avoid stacking those completions. Patch 2 is not strictly necessary since now we indeed shouldn't be getting unexpected completions, but it seems to me it is better not to fully rely on that and skip unexpected ones just in case.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3446
Some applications (e.g. UE4) requires
the DriverVersion string in the registry.
The string is taken from `dlls/wbemprox/builtin.c`
--
v6: win32u: Add DriverVersion string for GPUs to registry.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3104
Some applications (e.g. UE4) requires
the DriverVersion string in the registry.
The string is taken from `dlls/wbemprox/builtin.c`
--
v5: win32u: Add DriverVersion string for GPUs to registry
https://gitlab.winehq.org/wine/wine/-/merge_requests/3104
Let The Good Life able to play its intro video, the game creates a source reader from a `http://localhost:6000/<random-hash>` URL. This should also probably work with other games playing streams over http(s).
This is a very basic implementation, using urlmon, and it will download the entire stream to a local temporary file before playback. An more optimized implementation would probably use WinHttp and range requests to partially download the requested stream segments, but this can be implemented in a future change.
--
v2: mfreadwrite: Allow URL source resolution to not match extension or mime type.
mf/scheme_handler: Implement http(s):// scheme handler using urlmon.
mf/scheme_handler: Split file scheme handler to scheme_handler.c.
mfplat: Support MF_BYTESTREAM_EFFECTIVE_URL attribute.
mf/tests: Add some network scheme resolver tests.
include: Add MF_BYTESTREAM_EFFECTIVE_URL GUID declaration.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3439
Signed-off-by: Fan WenJie <fanwj(a)mail.ustc.edu.cn>
Hook mmap and munmap seem to be the only solution for drivers such as OpenGL to allocate over 32-bit address. For example, Fairy and Sword 4 has some render problems on master branch of wine. The patch can solve the problems.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3460
This is meant to simplify testing conditions that generally hold true
but may occasionally fail due to interference from external factors
(such as processes that start / stop, network connections being
opened / closed, etc).
The trick is to loop a few times on the set of flaky conditions until
they succeed. During the last attempt all failures are recorded as
usual, while in the previous runs, the tryok() failures area ignored
but cause one more attempt to be made.
The simplest case looks like this:
LOOP_ON_FLAKY_TESTS(3)
{
// ok() failures are never ignored and not retried
ok(..., "check 1", ...);
// tryok() failures are ignored except on the last attempt
tryok(..., "check 2", ...);
}
There is also:
* attempt_retry() which marks the current attempt as failed as if
calling tryok(0), and returns true if another attempt can be made.
* attempt_failed() which returns true if an ok() call failed.
---
This is independent from the 'flaky' mechanism which adds some naming
constraints. The loop macro is still called LOOP_ON_FLAKY_TESTS()
despite being unrelated to the flaky mechanism. The attempt_retry()
and attempt_failed() macro names also don't make it obvious that they
are related to tryok().
I think this mechanism is better than the flaky one because a flaky test
can go bad without anyone noticing, whereas if a tryok() starts failing
systematically it will cause a real failure.
The other side of that coin is that, unlike flaky, the tryok()
mechanism does not entirely eliminate the possibility of getting a
failure, it just reduces it; though by adjusting the maximum number of
attempts one can achieve an arbitrarily low failure rate. For instance
if an ok() call fails 10% of the time and one wants a maximum of 1 in
a million failure rate, use LOOP_ON_FLAKY_TESTS(6). The cost is an
increased run time in the worst case.
This also limits the use of this mechanism to tests that have a
reasonably low failure rate to start with (otherwise one has to loop
too many times). Also note that there are cases where looping
essentially reduce the failure rate to zero. For instance
ieframe:webbrowser fails if IE creates a net session while the test is
counting them. But IE only creates the one net session on start up so
trying even one more time should guarantee that the test will succeed.
Other cases like scheduling delays and the creation of network
connections are more probabilistic in nature. Maybe a comment in test.h
should offer some guideline as to the target failure rate.
Eventually this may replace the flaky mechanism but that depends on
how well it works in practice and how practical it is to loop on flaky
tests. It seems to be going well in the few cases I looked at. But I
think this mechanism has value even if the two end up coexisting
indefinitely.
This MR uses the tryok() in some actual tests for illustration and testing purposes. The final MR will probably split most of those off to separate MRs.
--
v3: mmdevapi/tests: Replace flaky with tryok() in the capture tests.
mmdevapi/tests: Replace flaky with tryok() in the render tests.
quartz/tests: Replace flaky() with tryok() to work around scheduling delays.
DEBUG ieframe/tests: tryok() framework testing ground.
ieframe/tests: Work around a network session race condition.
advapi32/tests: Replace the custom loop with tryok() mechanism.
ntdll/tests: Use tryok() to fix a free disk space race with other processes.
kernel32/tests: Use tryok() to fix a heap race with other processes.
FIXME(traces) tests: Add tryok() for tests that may need multiple tries to succeed.
tests: Update the documentation.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3418
This is required to avoid silencing (potentially fatal) exceptions from timer procedures.
--
v3: win32u: Ignore unhandled info index in NtUserSetObjectInformation.
win32u/tests: Add tests for NtUserSetObjectInformation.
user32: Implement UOI_TIMERPROC_EXCEPTION_SUPPRESSION.
user32/tests: Add tests for UOI_TIMERPROC_EXCEPTION_SUPPRESSION.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3454
This fixes a bug in wine when running on 9pfs where short reads would occur, causing binaries to be loaded incorrectly. All other filesystems on Linux ignore O_NONBLOCK for regular files, so this should not affect them.
Thanks to Paul Gofman for the advice on this fix.
---
Ref https://gitlab.winehq.org/wine/wine/-/merge_requests/3390 for my original attempt at fixing this, particularly https://gitlab.winehq.org/wine/wine/-/merge_requests/3390#note_40093 which describes the strange situation `O_NONBLOCK` finds itself in on filesystems.
The risk with this MR is that fifo, unix sockets or other special files opened via `open_unix_file` in ntdll will now have changed behaviour - but my quick look suggests that this is unlikely, as `open_unix_file` is only used for:
- `dlls/ntdll/unix/file.c`: `NtCreateFile` and `NtDeleteFile`
- `dlls/ntdll/unix/process.c`: loading PE information and getting a dirfd for the current directory
- `dlls/ntdll/unix/env.c`: `open_nls_data_file`
- `dlls/ntdll/unix/loader.c`: dll load functions
- `dlls/ntdll/unix/registry.c`: `NtLoadKeyEx`
cc @gofman
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3445
The read and pread syscalls are permitted to return fewer bytes than requested (unlike the fread libc call which will only perform a short read on error or EOF). This is most likely to occur when binaries are located on slower filesystems (e.g. NFS or 9pfs)
ffab9d9 is a relatively recent regression here, but a lot of the code appears to be much older (e.g. the read call in 341b7dc)
In this MR I've focused on ntdll, but I see a lot of similar mishandling of the pread return value in `server/`. I will raise a bug as I don't intend to create a follow up MR at this time.
--
v3: ntdll: Correctly handle pread short reads
https://gitlab.winehq.org/wine/wine/-/merge_requests/3390
On Fri Jul 28 02:22:22 2023 +0000, **** wrote:
> Marvin replied on the mailing list:
> ```
> Hi,
> It looks like your patch introduced the new failures shown below.
> Please investigate and fix them before resubmitting your patch.
> If they are not new, fixing them anyway would help a lot. Otherwise
> please ask for the known failures list to be updated.
> The tests also ran into some preexisting test failures. If you know how
> to fix them that would be helpful. See the TestBot job for the details:
> The full results can be found at:
> https://testbot.winehq.org/JobDetails.pl?Key=135341
> Your paranoid android.
> === debian11 (32 bit zh:CN report) ===
> Report validation errors:
> d3d11:d3d11 crashed (c0000005)
> ```
This looks like https://bugs.winehq.org/show_bug.cgi?id=53217 so I don't think it's new
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3431#note_40653
This serie:
- adds a couple of tests to CreateProcess to cover ctrl-c blocking inheritance flag
and process group creation
- populates RTL_USER_PROCESS_PARAMETERS.ProcessGroupId
- separates new process group creation from ctrl-c inheritance flag
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3442
Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/dxil.c:
> FIXME("Unhandled dxil instruction %u.\n", record->code);
> return VKD3D_ERROR_INVALID_SHADER;
> }
> + /* Allocation failure. */
That's not necessarily the case, is it? Any call to `vkd3d_shader_parser_error()`, such as in `dxil_record_validate_operand_min_count()`, could trigger this failure.
More in general, I think we there is some confusion between whether to use the parser `failed` bit vs using the return value. We could use the same convention as the HLSL compiler: `failed` is set as soon as an error is found, and it should always set via `vkd3d_shader_parser_error()` so that a diagnostic is always available; an error return value should only be used when an error was found and parsing must halt immediately.
In this scheme you should never look at `failed` to decide what to return, because you don't know if `failed` was set because of an error that still allows parsing or not. You have to genuinely propagate the return code at each level.
It is useful to have memory allocation functions that also set the `failed` bit, like the HLSL compiler.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/283#note_40646
Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/dxil.c:
> ++block_idx;
> code_block = (block_idx < function->block_count) ? function->blocks[block_idx] : NULL;
This was already here before, but I just realized that setting `code_block` to `NULL` might give a few problems if there are some other instructions (which shouldn't be there, but the shader might be untrusted input). Specifically, various lines in this loop assume that `code_block` is valid, and if it's not an `assert()` could be triggered.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/283#note_40645
Let The Good Life able to play its intro video, the game creates a source reader from a `http://localhost:6000/<random-hash>` URL. This should also probably work with other games playing streams over http(s).
This is a very basic implementation, using urlmon, and it will download the entire stream to a local temporary file before playback. An more optimized implementation would probably use WinHttp and range requests to partially download the requested stream segments, but this can be implemented in a future change.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3439
This get us pass the "Update your browser" blocker in adobe's sign-in page. The page itself doesn't make use of `window.MutationObserver`.
However the sign-in page is still broken.
--
v23: mshtml: add stubs for MutationObserver methods
mshtml: implement window.MutationObserver with MutationObserver stub
https://gitlab.winehq.org/wine/wine/-/merge_requests/3391
@huw I had a look at the output of the failure from MR #3423, but I can't see why it is trying to use `-lpcsclite`. Rhe configure check for it fails, but the one for PCSC.framework succeeds, so it should be using that. I'll try to look further.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3389#note_40620
It looks like this is breaking `build-mac` on gitlab.
```
ld: library not found for -lpcsclite
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [dlls/winscard/winscard.so] Error 1
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3389#note_40617