tests: the stack reserve need not be the last link option (TEST-BUILD-FALLBACK-STACK-OPTION) #2618
No reviewers
Labels
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!2618
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2618"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Mby159 on GitHub · 2026-11-29 17:49 UTC · original
Mby159:test/build-fallback-stack-option→main· +14 −2 · 1 files · 4 commits · merged 2026-11-29 19:01 UTCRebased replacement for #2573.
ProjectLeonida/mandy@4364a4f.tests/test_build_runtime_fallback.py./STACK:${GTA6RT_STACK}.Mby159/leonida@backup/pr-2573-ae7a0936a6.AI-assisted: yes.
@merzleckeier on GitHub · 2026-11-29 17:54 UTC · original
Independent check of
c76c322bon4364a4fa6. The standalone fallback suite has ten passing cases and one Windows-only skip on Linux, on both unmodified trees. The new regex correctly accepts a valid option after/STACK:${GTA6RT_STACK}. It also accepts source that links a different reserve than the unchanged 8 MiB fallback.I ran the exact Python assertion with five CMake variants, then linked tiny Windows PEs using each variant’s actual
target_link_optionswith clang-cl/xwin and lld-link.llvm-readobjreported these reserves./INCREMENTAL:NO0directly to${GTA6RT_STACK}/STACK:16777216The existing PE check is a minimum check. I confirmed it rejects the 1 MiB case; it also accepts 16 and 80 MiB. Equality with the fallback still needs the static guard. One tested way to preserve it with the current flat CMake flag list is to split the option block and match the exact stack token once:
That passes the two 8 MiB cases, rejects all three mismatches, and passes the full standalone fallback suite with the same Linux skip. AI-assisted with OpenAI Codex (GPT-6).
@Mby159 on GitHub · 2026-11-29 17:59 UTC · original
CI baseline comparison for the current red checks:
4364a4fa61f6bc42eefc94452c3a565fc530dd34already has failingsemantic-tests (ubuntu-latest),translator-tests,stdlib-tests-linux,check, andmacos-pythonjobs.semantic-testsfails intest_interp_computed_ij_fallback;translator-testsfails in sixtests/test_mesh_serial_waves.pycases. Neither file is touched by this PR.no-game-data,change-scope, andviewer-testspass.tests/test_build_runtime_fallback.py; local validation confirmed the old regex rejects a valid/STACKoption followed by another linker option, while the new regex accepts it.AI-assisted: yes.
@Mby159 on GitHub · 2026-11-29 18:08 UTC · original
Updated head
eace3acd, with currentmain(eedd72e3) merged into the branch.The assertion now anchors
target_link_options(gta6rt ...)at line start, strips comments from the captured option list, and requires exactly one/STACK:${GTA6RT_STACK}token. This keeps the original equality check while allowing unrelated trailing linker options.Local validation: two valid variants pass (current flags; appended
/INCREMENTAL:NO), and three invalid variants are rejected (wrong reserve suffix, fully commented-out stack option, second overriding/STACK).AI-assisted: yes.
@merzleckeier on GitHub · 2026-11-29 18:16 UTC · original
Retested
eace3acdoneedd72e30against the same linked PE fixtures. Stock and the extra unrelated option pass at 8 MiB. The numeric suffix (80 MiB), commented-out option (1 MiB), and later CMake override (16 MiB) are now all rejected.One analogous case remains in the PowerShell fallback assertion. Appending
/stack:16777216after/STACK:8388608on the/Fe:gta6rt.exeline passes the Python check. A minimal PE linked with those two flags in that order withlld-linkhasSizeOfStackReserve = 16777216. Checking the complete list of stack options on both sides would close that gap. I tested replacing just the fallback assertion with:This rejects the fallback override and preserves the other six results. Both standalone runs on Linux passed 10 tests with one Windows-only skip. This used tiny synthetic PEs to verify the link flags. AI-assisted with OpenAI Codex.
@Mby159 on GitHub · 2026-11-29 18:21 UTC · original
Updated head
c680918.The PowerShell fallback assertion now partitions the
/linkflags and requires exactly one matching stack option, accepting both/STACK:and-STACK:spellings. Local validation passes the current flag, an unrelated trailing option, and-STACK; it rejects a later overriding/stackand a wrong reserve.AI-assisted: yes.
@TheGeogeo on GitHub · 2026-11-29 18:48 UTC · original
Tested
c68091870merged (no commit) with main7c330c76d: Python 3.12.4, Windows 11 10.0.26300, CPU only.tests/test_build_runtime_fallback.py): 11 of 11 pass on the merge, 0 skipped.runtime/CMakeLists.txtstill puts/STACK:last. The change only lets the check accept/STACK:${GTA6RT_STACK}anywhere among thegta6rtlink options, and in the fallback/linkline, instead of last.git merge-treeagainst #2566's head7b5cb2941: no conflict.AI-assisted (Claude Code).
@MoonEyes on GitHub · 2026-11-29 19:00 UTC · original
Merging. Head
c68091870has red/green verdicts from reviewers other than the author (above), merges cleanly withmainb8346588d, does not force a rebase of #2566, and carries a claim ID. Remaining main CI reds (translator-testsmesh,semantic-testsf16) are pre-existing. Merged by MoonEyes.AI-assisted (Claude Code).