Commit graph

165108 commits

Author SHA1 Message Date
Gabriel Ivăncescu 1b385fa37c jscript: Store detached args into a scope's specialized buffer.
Rather than using the variable obj for it. Since it's an implementation
detail, the scope's dispex object accesses them using index props (using
same indices as the buffer's).

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-06-21 18:54:45 +02:00
Gabriel Ivăncescu e72e8f3ab4 jscript: Don't use iface_to_jsdisp where it's not necessary to grab it.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-06-21 18:54:45 +02:00
Gabriel Ivăncescu 0e9d221582 jscript: Get rid of jsobj in scope_chain_t.
It was confusing and aliased to obj when it was a jsdisp (and shared ref), but
we can obtain that already with helpers as needed (as_jsdisp and to_jsdisp),
no reason to keep it so confusing and a separate field.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-06-21 18:54:41 +02:00
Gabriel Ivăncescu 08e0ebee49 jscript: Fix function leak in scope_init_locals.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-06-21 18:54:41 +02:00
Gabriel Ivăncescu 2173cac68e jscript: Fix addressing invalid memory if ref is an argument.
`ref` can be negative in case it refers to an argument. Even though scope !=
frame->base_scope would rule this out (because only base scopes have args),
it was checked *after* the memory access, which would read out of bounds
memory first. This didn't appear as an issue in practice since it's using the
heap pool, so there's probably valid memory before it, but it's still wrong.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-06-21 18:54:39 +02:00
Gabriel Ivăncescu a184ace43d jscript: Correctly implement context for indirect eval calls in ES5+ modes.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-06-21 18:54:39 +02:00
Rémi Bernon 9b7669592d win32u: Move virtual desktop display settings logic from winex11. 2023-06-21 18:26:33 +02:00
Rémi Bernon 08fd8ad0b6 win32u: Split default UpdateDisplayDevices implementation to a helper. 2023-06-21 18:26:32 +02:00
Liam Middlebrook 0911d462f9 cmd: Fix empty strings between PATH separators.
Previously if an empty string was encountered while parsing out PATH,
cmd.exe would ignore the rest of the PATH entirely.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55097
Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>
2023-06-21 18:25:48 +02:00
Liam Middlebrook 9aee47f7f6 cmd/tests: Add tests for PATH separator.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55097
Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>
2023-06-21 18:25:38 +02:00
Paul Gofman a19c871291 crypt32: Do not create persistent container in CRYPT_CreateKeyProv(). 2023-06-21 18:15:43 +02:00
Giovanni Mascellani e0ce5e331a dxgi: Rename and split d3d12_swapchain_destroy_buffers(). 2023-06-21 18:15:43 +02:00
Giovanni Mascellani 2e556c3245 dxgi: Only create D3D12 resources when necessary. 2023-06-21 18:15:43 +02:00
Giovanni Mascellani c10e272152 dxgi: Do not destroy D3D12 resources unless requested.
This is probably a leftover of when Vulkan swapchain images were
used directly.
2023-06-21 18:15:43 +02:00
Giovanni Mascellani bc3edfd188 dxgi: Remove now-useless function d3d12_swapchain_create_buffers(). 2023-06-21 18:15:43 +02:00
Giovanni Mascellani 0521f57027 dxgi: Do not uselessly pass queue_family_index around. 2023-06-21 18:15:43 +02:00
Alexandre Julliard bef61e293c ntdll: Implement _errno(). 2023-06-21 18:15:43 +02:00
Alexandre Julliard 2ef4cc48fb wow64: Map a copy of ntdll to build the syscall table.
The original ntdll may have been hooked.
2023-06-21 18:15:43 +02:00
Alex Henrie 5da3827d86 ws2_32: Don't export num_startup. 2023-06-20 20:31:08 +02:00
Alex Henrie 8102e2ca2b crypt32: Don't export CRYPT_CopyReversed. 2023-06-20 20:31:05 +02:00
Alex Henrie df7ed47b02 sane: Fix use after free in create_item (scan-build).
realloc may free lead_static.
2023-06-20 20:30:41 +02:00
Rémi Bernon f7e76184f1 winex11: Make sure HIMC is opened before sending IME updates. 2023-06-20 20:30:29 +02:00
Rémi Bernon 97c0a52ae5 winex11: Report empty preedit string when result string is committed.
Based on a patch from Byeong-Sik Jeon <bsjeon@hanmail.net>.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55027
2023-06-20 20:30:28 +02:00
Rémi Bernon e564619172 imm32: Use offsets instead of lengths to decide on sending updates.
The composition or result strings may be present, but with zero length.
In which case we still want to send the messages, to indicate any change
for instance whenever a character is deleted and strings become empty.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55055
2023-06-20 20:30:26 +02:00
Rémi Bernon d1f9aae599 imm32/tests: Test how deleting a character can behave. 2023-06-20 20:30:26 +02:00
Eric Pouech 5efe29edc0 dbghelp: Implement SymSrvGetFileIndexInfo for PE modules.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2023-06-20 20:29:53 +02:00
Eric Pouech 4d32b2ee30 dbghelp/tests: Add tests for SymSrvGetInfoIndexes.
Tests related to debug directories.
Extending the PE image generator with debug directories.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2023-06-20 20:29:52 +02:00
Eric Pouech 954f302f70 dbghelp/tests: Add tests for SymSrvGetIndexesInfo.
Tests on PE image (header part, no debug directory).
Add infrastructure to generate PE image (derived from
kernel32/tests/loader.c).

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2023-06-20 20:29:49 +02:00
Eric Pouech 1f437ed89a dbghelp: Create implementation basis for SymSrvGetFileIndex*().
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2023-06-20 20:29:48 +02:00
Eric Pouech 20f6b54019 include/dbghelp.h: Added some missing definitions.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2023-06-20 20:29:45 +02:00
Jinoh Kang 966233aee6 loader: Set the visibility of symbols in preloader to "hidden".
Today, the preloader is linked with -fPIE in spite of the fact that the
preloader is a non-PIE statically linked binary.  This is due to a
limitation in tools/makedep that makes it difficult to specify CFLAGS
for each individual object file's recipe.

This can seemingly cause problems with some GOTPCREL(X) relocations
inside the preloader. Since preloader does not link to the system
library directly, there is no need for a Global Offset Table (GOT).
However, a few extern (non-static) function symbols are declared, the
use of which makes GCC emit instructions that references those symbols
by indirection through GOT.  The linker then tries to optimize such
instructions to eliminate GOT references, which can fail due to various
reasons.

This stands in contradiction with Jinoh Kang's suggestion (in bug 55050)
that "-fPIE is harmless even when applied to an object linked into
non-PIE executables." The claim is theoretically true since
position-independent code can in principle be relocated to any address
(fixed or dynamic); however, it fails due to some peculiar practical
issues, which is arguably a limitation in the linker's implementation
(since it can be worked around with -Wl,--no-relax without issues).

Fix this by eliminating GOT usage by setting the default visibility of
non-static declarations to "hidden". Assuming GCC's medium code model
(-mcmodel=medium; default code model for x86_64), this suppresses any
unnecessary PLT or GOT relocations for defined symbols, and provides
opportunity for GCC to optimize the code better.

Fixes: 78ed343842
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55091
2023-06-20 20:27:45 +02:00
Nikolay Sivov 05aa740787 oleaut32: Trace typelib guid in GetRecordInfoFromGuids(). 2023-06-20 20:27:38 +02:00
Nikolay Sivov fb083f4f37 oleaut32/recinfo: Use CoTaskMem* allocations for the record data. 2023-06-20 20:27:37 +02:00
Nikolay Sivov d9d665705e oleaut32/recinfo: Use CRT allocation functions. 2023-06-20 20:27:36 +02:00
Alex Henrie 078f4dcd44 wbemprox: Fix memory leak on error path in enum_key (scan-build). 2023-06-20 20:27:21 +02:00
Alexandre Julliard c938f92e4c wordpad: Use nameless unions/structs. 2023-06-20 15:58:05 +02:00
Alexandre Julliard 35299b39cb winhlp32: Use nameless unions/structs. 2023-06-20 15:58:05 +02:00
Alexandre Julliard 6c9246e022 winemenubuilder: Use nameless unions/structs. 2023-06-20 15:58:05 +02:00
Alexandre Julliard 63f94c4925 winefile: Use nameless unions/structs. 2023-06-20 15:58:05 +02:00
Alexandre Julliard f20710d9b3 winedbg: Use nameless unions/structs. 2023-06-20 15:58:05 +02:00
Alexandre Julliard 4368bd8e60 winecfg: Use nameless unions/structs. 2023-06-20 15:58:05 +02:00
Rémi Bernon c47c4d54bd winegstreamer: Lazily allocate wg_allocator unix memory. 2023-06-19 22:51:05 +02:00
Rémi Bernon ca03b68cf4 winegstreamer: Move release_memory_sample helper around. 2023-06-19 22:51:05 +02:00
Rémi Bernon ca20e06051 winegstreamer: Remove the callback mechanism from wg_allocator. 2023-06-19 22:51:05 +02:00
Rémi Bernon 59dedf2754 winegstreamer: Remove colorimetry and chroma-site from wg_format caps.
They are set by default and will force color conversions we may not
want in the wg_transform videoconvert.
2023-06-19 22:50:55 +02:00
Connor McAdams 41f07a8a0f uiautomationcore: Implement UiaEventAddWindow.
Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
2023-06-19 22:50:45 +02:00
Connor McAdams 92623ccdf0 uiautomationcore: Add support for advising providers of events on serverside events.
Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
2023-06-19 22:50:45 +02:00
Connor McAdams 2da4d47b5d uiautomationcore: Prevent creation of duplicate serverside events.
Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
2023-06-19 22:50:45 +02:00
Connor McAdams 549a276c32 uiautomationcore: Add support for creating serverside events.
Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
2023-06-19 22:50:45 +02:00
Connor McAdams fa02af30e6 uiautomationcore/tests: Add tests for cross-process events.
Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
2023-06-19 22:50:45 +02:00