Repository navigation
Conversation
Replace the source-text guard with an allocation-observing runtime test. The unchanged builder and a check moved after resize both fail; the guard passes, including a valid allocation near the upper RVA limit. Register the test on every host and use the production import builder. Addresses the review feedback on boykopovar#6204.
|
Merging this pull request would not change |
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.
What
The runtime boundary test in boykopovar#6204 passes with and without its allocation guard. The separate CMake test searches for literal source strings, so it cannot establish that the guard runs before
resize.Depends on boykopovar#6204 (included). The first commit,
26375a30ef, is vrebel11's production guard rebased ontomain, with authorship preserved. My contribution is the second commit,36eeec6bb5: test coverage and registration only. This remains a draft for coordinating the follow-up while boykopovar#6204 is open; the test commit can also be cherry-picked into boykopovar#6204.operator newrecords the largest allocation, followingUseRewriteAllocation.cpp. With 4096 bytes left belowINT32_MAX, the builder must reject the 64 KiB startup buffer before allocating it.INT32_MAX. UseWindowsImportBuilderfor the imports instead of a second list of function names.windows_entry_stub_boundson every host, with a 20-second timeout. RemoveWindowsEntryStubEndpointGuard.cmakeand its registration; fix the trailing newline and spacing.This addresses the review on #6204. It does not establish a fix for the intermittent GCC crash in boykopovar#5927.
Tested
Windows x64, WinLibs GCC 15.2.0 r7 UCRT/POSIX, Ninja 1.13.2, Python 3.14.2; relinker-only builds with
BUILD_TESTING=ON.3a416dd952merged with main25648aa121in a separate checkout (8b378bd976). Fresh configure and full build passed without compiler warnings. Serial CTest completed in 304.53 s: 203 passed, 0 failed, 1 skipped out of 204. No concurrent build/test job was started.windows_dependency_diagnostics,guest_module_identityandwindows_import_modulesall passed in this run.The entry stub allocated past the RVA limit before rejecting it. Moving the endpoint check afterresizealso fails with that message. Restoring the guard passes, including the high-RVA control. Debug with_GLIBCXX_ASSERTIONSpassesentry_stubandwindows_entry_stub_bounds, 2/2. Both new source files pass-Wall -Wextra -Wpedantic -Werrorsyntax checks.8c1c8a24b8fb57d62a2ea0b06ab9551d848e1f1f5fa4e9828b4edb7c40b7783f.36eeec6bb5is based on main8a526d4495. Compared with the fully tested integration,core/relinker, root CMake,cmake,toolsand the build workflow are unchanged. The exact rebased commit has not received another full suite run. Conventions and whitespace checks pass.Earlier, on base
017f2151ca, a parallel 204-test run that overlapped a Debug build had 200 passes, three timeouts and one skip. The three tests named above then passed serially on both unchanged main and the fix, and passed again in the fresh full serial run. The cause of the parallel failures remains unestablished, so parallel CI stability is not claimed.long_pathsskips because this host'sLongPathsEnabledis not 1. No Windows or antivirus settings were changed. Linux/macOS execution and upstream build checks remain pending. No full runtime, title, GPU, performance or exhaustive PE-validation claim is made; the vector-capacity branch was inspected, not forced through an impractically large public input.Overlap review: the required
tools/pr_overlap.pyrun completed serially after refreshing a partial-clone object fetch. It reported the expected overlap with included boykopovar#6204. The shared-file diffs it could not compare were inspected for boykopovar#2780, boykopovar#5021, boykopovar#5138, boykopovar#6044, boykopovar#6802, boykopovar#6879, boykopovar#6977, boykopovar#7173, boykopovar#7332, boykopovar#7450, boykopovar#7531 and boykopovar#7594; boykopovar#6586 was inspected when the bot subsequently added it. They add other sources/tests or change test registration. boykopovar#6044 would require adapting the new registration if itsadd_component_testconversion lands first. boykopovar#7594 changes MXCSR handling around the guest entry call, away from the allocation guard. boykopovar#6586 adds a separateguest_zero_initializerregistration. No additional prerequisite was identified; no combined runtime result is claimed.Checklist
main; no other open PR implements the same functions (own test-only follow-up; fix(relinker): guard Windows entry-stub RVA allocations boykopovar/AnyPS5#6204 is the included prerequisite)NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)