Initialize guest floating-point state explicitly - #137
Merged
Conversation
encounter
force-pushed
the
fix/mwcc-codegen-divergence
branch
from
July 12, 2026 23:22
dd835d9 to
61cc9c1
Compare
Member
|
Thanks! I verified this as a bug and rewrote it to match the existing codebase style. |
freeqaz
added a commit
to freeqaz/wibo
that referenced
this pull request
Aug 5, 2026
This fork sat at 1.0.1-23 while upstream shipped 1.1.0 and 1.2.0, both of which are explicitly about the toolchain we run: per-ABI msvcrt embedding, "improve kernel32 compatibility for MSVC tools" (decompals#124), a module-TLS-init race fix, and a per-thread FLS / Windows-faithful CRITICAL_SECTION fix whose commit message names the symptom we have hit ("intermittent MSVC c2.dll deadlock", decompals#126). 1.0.1 itself was cut because msvc_ppc_16.00.11886.00 -- our exact compiler -- segfaulted. Staying behind on a fork whose upstream is working on our workload is how a fork rots. Target is upstream/main tip (e8f4795), not the 1.2.0 tag, for two reasons: decompals#134 adds GetTempFileNameW, which is one of the local patches this fork carried, so taking the tip lets us DELETE ours; and decompals#137 initializes guest floating-point state explicitly, which is exactly the kind of thing that can move a compiler's constant folding and is therefore better under test than deferred. Seven files conflicted. Resolutions, and which side won: CMakeLists.txt BOTH -- two fixture registrations that landed on the same line (ours test_mspdb, theirs test_env_strings). kernel32/minwinbase.h THEIRS. Upstream added WIN32_FILE_ATTRIBUTE_DATA independently, with both the P and LP aliases. Our copy deleted as redundant. kernel32/fileapi.h BOTH, deduplicated. Kept our GetTempPathW and FindFirstFileExW (upstream has neither); dropped our now-duplicate GetTempFileNameW and GetFileAttributesEx declarations in favour of upstream's. kernel32/fileapi.cpp THEIRS for GetFileAttributesExA/W -- upstream's has the license.dat special case and correct ERROR_PATH_NOT_FOUND mapping, ours had neither. Deleted our duplicate GetTempFileNameW definition; upstream's (decompals#134) accepts a null prefix, as Windows does, and ours rejected it. kernel32/memoryapi.cpp THEIRS for both hunks. Upstream implemented the same two fixes this fork carried -- growing the backing file for a larger mapping, and FILE_MAP_ALL_ACCESS not meaning copy-on-write -- and its versions are strictly better (a protectAllowsFileGrowth guard, a size_t overflow check, and one fileMapAccessFromDesiredAccess helper shared with desiredAccessToProtect). Two more redundant local patches deleted. kernel32/winbase.cpp THEIRS for lstrcpynA (decompals#124 -- Windows-faithful null handling, and it has a fixture, test/test_lstrcpyn.c). Ours deleted. lstrcpyA/W and lstrcpynW stay -- upstream has no such functions -- but lstrcpynW's null/count handling is rewritten as a transcription of upstream's A so the pair cannot drift. src/modules.cpp BOTH: upstream's builtin table (it adds lib_shlwapi) plus our WIBO_HAS_MSPDB entry. src/files.cpp OURS, plus one adoption. pathFromWindows here is a fork rewrite -- WIBO_PATH_MAP, WIBO_DRIVE_x, the WIBO_FS_CACHE exists/dirent/case caches, /showIncludes rewriting -- and all of it is load-bearing for dc3-decomp, so upstream's much simpler version loses. Upstream's stripTrailingDots (decompals#118, the NMAKE "nm12345." convention) is genuinely new and is taken, called one step earlier than upstream calls it so that the WIBO_DRIVE_x branch sees it too. Four local patches are now gone as redundant: GetTempFileNameW, the file-mapping growth, the FILE_MAP_ALL_ACCESS fix, and lstrcpynA. Everything else this fork carries survived: sigsafe.cpp, the mimalloc foreign-free fix, the 8 MiB guest stack, mspdb, the X360 linker support, wsprintfW, and the files.cpp caches.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It looks like you need to set a flag in a control register at least on my M4 MacBook Air. My only validation is this fixed an issue in a vibe code decomp I had for 7 functions. Late in the decomp I wanted to switch to this project from Wine because I was losing my mind with Wine, but I lost 7 matched functions. GPT 5.6 root-caused the fix and matched all 7
wibowith no regressions on >3200 functions.GPT 5.6