Add a '__program_vars' section to the preloader, to make it a correct macOS 10.7 binary.
This fixes Wine crashing on macOS Sonoma, and GStreamer crashing when initialized by Wine (on macOS Monterey and later).
However this causes dyld to initialize libSystem before the preloader runs, resulting
in system allocations throughout the ranges that need to be reserved.
To prevent this, use a zerofill section to reserve the entire low 8GB of address space
for use by Wine.
This also has the benefit of reserving as much address space as possible for Wow64.
Additionally, this MR is a step towards not using the preloader entirely on 64-bit macOS (it relies on very unsupported APIs and methods).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3349
On Mon Jul 17 20:07:36 2023 +0000, Esme Povirk wrote:
> If the IWICPalette has only 4 colors in it, it can be assumed to only
> return 4 colors. If for some reason we need a test for palettes writing
> out of bounds (which I don't think we do), that should go in palette.c.
Since 256 was hard-coded in `GifDecoder_CopyPalette` for the no-GCT-present case (256 was correct for the test case), I had thought it might be worth-while to expand the testing. However, I suppose the `IWICPalette_GetColorCount` check should be sufficient.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3344#note_39204
Esme Povirk (@madewokherd) commented about dlls/windowscodecs/tests/gifformat.c:
> ok(color[1] == 0x00040506, "expected 0x00040506, got %#x\n", color[1]);
> ok(color[2] == 0xff070809, "expected 0xff070809, got %#x\n", color[2]);
> ok(color[3] == 0xff0a0b0c, "expected 0xff0a0b0c, got %#x\n", color[3]);
> + for (i = 4; i < 256; i++)
> + ok(color[i] == 0xdeadbeef, "expected 0xdeadbeef, got %#x\n", color[i]);
If the IWICPalette has only 4 colors in it, it can be assumed to only return 4 colors. If for some reason we need a test for palettes writing out of bounds (which I don't think we do), that should go in palette.c.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3344#note_39201
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54748
--
v4: gdiplus: Fix GdipGetAllPropertyItems return value when no properties exist.
gdiplus: Fix GdipGetPropertySize return value when no properties exist.
gdiplus/tests: Pare down image property tests that are not run for Wine.
gdiplus/tests: Use test context for test ran in a loop.
gdiplus/tests: Add GIF to image properties tests.
gdiplus/tests: Use consistent no-alternate value for image properties.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3302
Some tests in gdiplus output hex-formatted data chunks, but it is very hard to read
EXAMPLE BEFORE FIX:
```
image.c:4831: Test marked todo: 16: data should match
image.c:4837: 40image.c:4837: 40image.c:4837: 40image.c:4837: 40image.c:4837: 40image.c:4837: 40image.c:4837: 80i
mage.c:4837: 80image.c:4837: 80image.c:4837: 80image.c:4837: 80image.c:4837: 80image.c:4837: 40image.c:4837: 40im
age.c:4837: 40image.c:4837: 40image.c:4837: 40image.c:4837: 40image.c:4837: 40image.c:4837: 40image.c:4837: 40ima
ge.c:4837: 40image.c:4837: 40image.c:4837: 40image.c:4838:
```
EXAMPLE AFTER FIX:
```
image.c:4802: Test marked todo: 16: data should match
image.c:4804: 40 40 40 40 40 40 80 80 80 80 80 80 40 40 40 40 40 40 40 40 40 40 40 40
```
--
v3: gdiplus/tests: Fix mangled test output when dumping data in hex format.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3313
--
v2: jscript: Properly set JS_E_WRONG_THIS as a TypeError.
mshtml/tests: Add tests for WeakMap.
jscript: Implement WeakMap.has().
jscript: Implement WeakMap.clear().
jscript: Implement WeakMap.delete().
jscript: Implement WeakMap.get().
jscript: Implement WeakMap.set().
jscript: Implement WeakMap instance stub and constructor.
jscript: Move the GC traversal for unmarking alive objects into a helper
jscript: Convert unlink_props to a helper that unlinks the entire object.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3300