fix: support VC6 precompiled header creation and reuse - #146
Open
banteg wants to merge 1 commit into
Open
Conversation
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.
VC6 (
CL.EXE6.0 SP5) aborts while creating an automatic precompiled header with/YX /Fprepro.pch: it calls the missingMoveFileExWexport withMOVEFILE_COPY_ALLOWEDto move its temporary PCH into place. Once that move succeeds, reusing the PCH exposes a second failure: a fixed-addressMapViewOfFileExview is absent from the allocator's address-space bookkeeping, so the next top-downVirtualAlloccan overwrite it. On macOS this reproduced as SIGBUS.This change implements
MoveFileExA/Wwith atomic no-replace renames, replacement checks, and cross-volume copy/delete fallback, including flushing copied data forMOVEFILE_WRITE_THROUGH. Reboot scheduling and link-tracking flags explicitly returnERROR_NOT_SUPPORTED; invalid flag combinations returnERROR_INVALID_PARAMETER. Fixed-address views now reserve, register, and release their ranges through the existing allocator bookkeeping, rejecting overlaps in both directions.Adds self-checking file-move and fixed-view collision regressions, plus a small manual VC6 reproducer in
test/vc6_pch(compiler supplied by the user).Validation:
statistics_update_check_workerandhighscore_sync_worker) also passed Wine/fork × plain/create/reuse: all six objects per function match after COFF timestamp normalization, with unchanged matching metrics.git diff --checkpass; clang-tidy reports only existing warnings outside the added code.The full Wine baseline has four existing fixture expectation failures (
shlwapi,gettempfilename,heap,rtl); both native wibo suites are green.