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>
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>
`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>
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>
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
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>
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