test(relinker): cover symbol range boundaries #1690

Closed
Sanjaysrinivas wants to merge 8 commits from upstream-pr/1690 into main
Sanjaysrinivas commented 2026-10-08 16:33:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Sanjaysrinivas on 2026-10-08T16:33:49Z.


What

Refs #1666. Depends on #1272. This PR adds complementary integration regressions and documentation. The prerequisite's original commit, 42e8a2a219ed3ac7f60ba259312cb3b2ee30dcdd, is merged into this branch with its original author and history, so CI tests the dependency and our changes together. No competing bounds implementation was written. Upstream main, 17350cf5fd54ad5c79ee495ed8e8615f4663bbd6, is an ancestor.

Keep this PR dependent on #1272; once it merges, rebase onto updated main so the remaining review covers only complementary tests and documentation. This PR does not independently close #1666.

CI fix #1717 (now superseded by merged #1715) isolates agc_driver_flat_store with CTest RUN_SERIAL, following the existing constant-store test isolation. Its original commit 158ae1ff is included. This unchanged GPU test timed out at 120.09 s during parallel Linux CI; main's first execution had already taken 117.11 s, compared with 73.10 s before parallel scheduling, and subsequent executions took 7-10 s. The timings are consistent with expensive cold software-GPU compilation and CPU contention; they do not establish a driver deadlock. The one-line fix retains the existing timeout, byte checks, dispatches and repetitions. The equivalent scheduling fix has merged into main through #1715, so #1717 is closed and is no longer an outstanding dependency. Its commit remains in this validated branch history; rebasing after #1272 merges will drop the duplicate change.

Overlap coordination: #1446 implements a separate RELA table-range guard. The shared CMake insertion point was resolved by moving the included dynamic_table_bounds registration within its existing Linux-only scope; git merge-tree --write-tree HEAD origin/pr-1446 now merges cleanly against 4da534fed782d12444f4c3f016e2b333dde15438. It is not a prerequisite. #1682 is an alternative implementation of the symbol guard already supplied by #1272, and cannot be stacked unchanged with it. This PR retains the explicitly declared #1272 dependency; if upstream selects #1682 instead, rebase the complementary tests/documentation onto that merged fix and remove the #1272 prerequisite from the branch. Do not merge both alternative guards.

  • Register 86 real CLI conversions covering ordinary/OS symbol tags, main/PLT relocations, valid RELATIVE and imported-symbol controls, R_X86_64_64, GLOB_DAT, JUMP_SLOT, bases past EOF/near UINT64_MAX, indexed sums wrapping into readable bytes, the largest symbol index, truncated name fields, exact EOF boundaries and invalid strings. Invalid lookups require exit 2, the expected diagnostic, and neither an executable nor a registry; crashes and unrelated errors fail. Successful controls check the output format, emitted import name and registry relocation type/offset/target.
  • Document the 24-byte stride/four-byte st_name contract in docs/dev/ARCHITECTURE.md. A four-byte field ending at EOF passes import lookup and Linux conversion; Windows subsequently requires complete symbol records during TLS code analysis. The Windows boundary control requires the import registry followed by that specific controlled rejection. Complete 24-byte EOF records succeed in both output modes.
  • Retain existing allocator and RELA implementations/tests. The included prerequisite supplies the symbol guard and its dynamic_table_bounds test. The adjacent audit verified shared relaEntryPos, dynamic-segment/string/JMPREL bounds and Windows load-range checks. Record two independently reproduced Linux segment gaps in TechnicalDebt.md: unchecked virtual-to-file offset addition and unchecked segment-end addition. They are scoped follow-ups, not fixes in this PR. Empty RELA table-range work remains with #1446.

On the unpatched 4b005b229e24be9ec3f185def9e59cbc03aa9e4a baseline, 16 assertions fail: maximum bases produce unrelated string errors, and wrapped indexed offsets produce four Linux executables instead of rejecting the input. With #1272's guard, all 86 conversions pass.

Tested

Current source: 1a8de5e4193ed07edb27ea7c9dde25d031573e1e, containing our documentation/tests commit e0178bd4f6ad925753fef916782a32d0fd224c3e, prerequisite 42e8a2a219ed3ac7f60ba259312cb3b2ee30dcdd, current main, the CMake registration move, and #1717's GPU-test scheduling change. Local Release suites below passed with --parallel 6 at b8940e8d (Windows) and e3899a0d (Linux), before adding #1717, which changes only GPU test scheduling. GitHub CI on the complete current stack passes every build job; all current applicable PR checks pass. The sanitizer and allocator results below were established during the initial investigation against the same production source and symbol guard. Synthetic fixtures; no game files.

Host/toolchain Checks Result
GitHub Ubuntu runner, Release, SPIRV-Tools enabled Full Linux suite, three repetitions, four parallel jobs with flat store isolated Zero failures out of 469 tests; capability-based skips retained; flat store 68.07 s, 6.03 s, 6.06 s
GitHub Windows runner, WinLibs GCC 15.2.0, Release Full Windows suite, three repetitions, four parallel jobs Zero failures out of 459 tests; capability-based skips retained
Windows 11, MinGW-w64 GCC 15.2.0, WinLibs 15.2.0posix-14.0.0-ucrt-r7, Release, Ninja Full registered relinker CTest suite 37/37 passed, including 86 symbol conversions
Ubuntu 24.04 on WSL2, GCC 13.3.0, Release, Ninja Full registered relinker suite, including prerequisite dynamic_table_bounds, existing rela_bounds, optional/empty PLT and strings 40/40 passed; Windows worktree Git metadata mapped into WSL
Same Linux host, GCC 13.3.0, ASan/UBSan, RelWithDebInfo 86 symbol conversions, existing RELA and optional-PLT regressions Passed, sanitizer errors fatal
Same Linux host, GCC 13.3.0, Release and ASan/UBSan Existing core/libs/tests/Mspace.cpp, linked directly with production Mspace.cpp and Process.cpp Passed; near-maximum ordinary/aligned failures retain bytes, usable size, statistics and subsequent resize/free/reuse
Unpatched main Release binary New symbol suite Expected failure: 16 rejected assertions, including 4 incorrectly completed Linux outputs

Commands (same relinker configuration on both hosts):

cmake -S . -B build-relinker -G Ninja -DCMAKE_BUILD_TYPE=Release -DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON
cmake --build build-relinker --parallel 6
ctest --test-dir build-relinker --output-on-failure --timeout 120
python core/relinker/relinker/tests/test_symbol_ranges.py build-relinker/core/relinker/relinker
python tools/check_conventions.py --base origin/main
git diff --check

On Windows the binary is relinker.exe. The instrumented executable was built from the same core/relinker CMake target in a temporary parent project with -fsanitize=address,undefined -fno-omit-frame-pointer -fno-pie, dynamic linking and -no-pie; ASAN_OPTIONS=detect_leaks=1:halt_on_error=1 and UBSAN_OPTIONS=halt_on_error=1. No sanitizer infrastructure is added to the repository (#1669 owns that work).

Allocator command from the repository root:

g++ -O3 -DNDEBUG -std=c++20 -ffunction-sections -fdata-sections -pthread -Icore/libs core/libs/tests/Mspace.cpp core/libs/prx/libc/src/Mspace.cpp core/libs/prx/libc/src/Process.cpp -Wl,--gc-sections -o /tmp/anyps5-mspace
/tmp/anyps5-mspace

The sanitizer allocator build uses -O2 -g -fsanitize=address,undefined -fno-omit-frame-pointer -fno-pie -no-pie instead of -O3 -DNDEBUG. Native Windows allocator linking and the full system-library/title suite were not verified.

Reproducer for the two adjacent Linux gaps recorded in technical debt

Run from the repository root, with the built relinker as the first argument. These cases are informational follow-ups and are not registered as regressions for this change. Main and this documentation/test branch both accept the malformed Linux images; Windows rejects them. This demonstrates wrong-source translation/output validity, not a newly established out-of-buffer read or title crash.

import struct
import subprocess
import sys
import tempfile
from pathlib import Path

sys.path.insert(0, 'core/relinker/relinker/tests')
from test_symbol_ranges import fixture, set_tag

relinker = str(Path(sys.argv[1]).resolve())
with tempfile.TemporaryDirectory() as directory:
    for name, offset, address, size in (
        ('file-offset-wrap', 0xfffffffffffff000, 0x2000, 0x2000),
        ('segment-end-wrap', 0, 0xfffffffffffff000, 0),
    ):
        image = fixture()
        struct.pack_into('<H', image, 0x38, 6)
        struct.pack_into('<IIQQQQQQ', image, 64 + 5 * 56,
                         0x6fffff01, 0, 0, 0, 0, 0, 0, 1)
        struct.pack_into('<IIQQQQQQ', image, 176,
                         1, 4, offset, address, address, size, 0x2000, 0x1000)
        if size:
            set_tag(image, 5, 0x3600)
        source = Path(directory) / (name + '.elf')
        source.write_bytes(image)
        for mode in ([], ['--windows']):
            output = Path(directory) / (name + ('.exe' if mode else '.out'))
            result = subprocess.run([relinker, '--skip-sce-module', *mode,
                                     str(source), str(output)],
                                    capture_output=True, text=True, timeout=20)
            print(name, mode, result.returncode, output.exists(), result.stderr)

Observed for both cases: Linux exit=0 output=True. Windows: exit=2 output=False, respectively Invalid PT_LOAD file range and PT_LOAD address overflow. Source locations are linked in docs/dev/TechnicalDebt.md; the invalid load headers are retained in the Linux output.

Checklist

  • Based on current main; complementary changes extend #1272, whose original prerequisite commit is included with attribution
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw; no silent stubs added
  • No notes, investigation .md files or images added to the repository; durable documentation updates existing developer files
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: #1272; original prerequisite commits are included so CI tests the complete stack; scheduling fix is already on main through #1715
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4789881396 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1690). Originally posted by [Sanjaysrinivas](https://github.com/Sanjaysrinivas) on 2026-10-08T16:33:49Z. --- ### What Refs #1666. **Depends on #1272**. This PR adds complementary integration regressions and documentation. The prerequisite's original commit, `42e8a2a219ed3ac7f60ba259312cb3b2ee30dcdd`, is merged into this branch with its original author and history, so CI tests the dependency and our changes together. No competing bounds implementation was written. Upstream `main`, `17350cf5fd54ad5c79ee495ed8e8615f4663bbd6`, is an ancestor. Keep this PR dependent on #1272; once it merges, rebase onto updated main so the remaining review covers only complementary tests and documentation. This PR does not independently close #1666. CI fix #1717 (now superseded by merged #1715) isolates `agc_driver_flat_store` with CTest `RUN_SERIAL`, following the existing constant-store test isolation. Its original commit `158ae1ff` is included. This unchanged GPU test timed out at 120.09 s during parallel Linux CI; main's first execution had already taken 117.11 s, compared with 73.10 s before parallel scheduling, and subsequent executions took 7-10 s. The timings are consistent with expensive cold software-GPU compilation and CPU contention; they do not establish a driver deadlock. The one-line fix retains the existing timeout, byte checks, dispatches and repetitions. The equivalent scheduling fix has merged into main through #1715, so #1717 is closed and is no longer an outstanding dependency. Its commit remains in this validated branch history; rebasing after #1272 merges will drop the duplicate change. Overlap coordination: #1446 implements a separate RELA table-range guard. The shared CMake insertion point was resolved by moving the included `dynamic_table_bounds` registration within its existing Linux-only scope; `git merge-tree --write-tree HEAD origin/pr-1446` now merges cleanly against `4da534fed782d12444f4c3f016e2b333dde15438`. It is not a prerequisite. #1682 is an alternative implementation of the symbol guard already supplied by #1272, and cannot be stacked unchanged with it. This PR retains the explicitly declared #1272 dependency; if upstream selects #1682 instead, rebase the complementary tests/documentation onto that merged fix and remove the #1272 prerequisite from the branch. Do not merge both alternative guards. - Register 86 real CLI conversions covering ordinary/OS symbol tags, main/PLT relocations, valid RELATIVE and imported-symbol controls, `R_X86_64_64`, `GLOB_DAT`, `JUMP_SLOT`, bases past EOF/near `UINT64_MAX`, indexed sums wrapping into readable bytes, the largest symbol index, truncated name fields, exact EOF boundaries and invalid strings. Invalid lookups require exit **2**, the expected diagnostic, and neither an executable nor a registry; crashes and unrelated errors fail. Successful controls check the output format, emitted import name and registry relocation type/offset/target. - Document the 24-byte stride/four-byte `st_name` contract in `docs/dev/ARCHITECTURE.md`. A four-byte field ending at EOF passes import lookup and Linux conversion; Windows subsequently requires complete symbol records during TLS code analysis. The Windows boundary control requires the import registry followed by that specific controlled rejection. Complete 24-byte EOF records succeed in both output modes. - Retain existing allocator and RELA implementations/tests. The included prerequisite supplies the symbol guard and its `dynamic_table_bounds` test. The adjacent audit verified shared `relaEntryPos`, dynamic-segment/string/JMPREL bounds and Windows load-range checks. Record two independently reproduced Linux segment gaps in `TechnicalDebt.md`: unchecked virtual-to-file offset addition and unchecked segment-end addition. They are scoped follow-ups, not fixes in this PR. Empty RELA table-range work remains with #1446. On the unpatched `4b005b229e24be9ec3f185def9e59cbc03aa9e4a` baseline, **16 assertions fail**: maximum bases produce unrelated string errors, and wrapped indexed offsets produce four Linux executables instead of rejecting the input. With #1272's guard, all 86 conversions pass. ### Tested Current source: `1a8de5e4193ed07edb27ea7c9dde25d031573e1e`, containing our documentation/tests commit `e0178bd4f6ad925753fef916782a32d0fd224c3e`, prerequisite `42e8a2a219ed3ac7f60ba259312cb3b2ee30dcdd`, current main, the CMake registration move, and #1717's GPU-test scheduling change. Local Release suites below passed with `--parallel 6` at `b8940e8d` (Windows) and `e3899a0d` (Linux), before adding #1717, which changes only GPU test scheduling. [GitHub CI on the complete current stack](https://github.com/boykopovar/AnyPS5/actions/runs/37817824741) passes every build job; all current applicable PR checks pass. The sanitizer and allocator results below were established during the initial investigation against the same production source and symbol guard. Synthetic fixtures; no game files. | Host/toolchain | Checks | Result | | --- | --- | --- | | GitHub Ubuntu runner, Release, SPIRV-Tools enabled | Full Linux suite, three repetitions, four parallel jobs with flat store isolated | Zero failures out of 469 tests; capability-based skips retained; flat store 68.07 s, 6.03 s, 6.06 s | | GitHub Windows runner, WinLibs GCC 15.2.0, Release | Full Windows suite, three repetitions, four parallel jobs | Zero failures out of 459 tests; capability-based skips retained | | Windows 11, MinGW-w64 GCC 15.2.0, WinLibs `15.2.0posix-14.0.0-ucrt-r7`, Release, Ninja | Full registered relinker CTest suite | 37/37 passed, including 86 symbol conversions | | Ubuntu 24.04 on WSL2, GCC 13.3.0, Release, Ninja | Full registered relinker suite, including prerequisite `dynamic_table_bounds`, existing `rela_bounds`, optional/empty PLT and strings | 40/40 passed; Windows worktree Git metadata mapped into WSL | | Same Linux host, GCC 13.3.0, ASan/UBSan, RelWithDebInfo | 86 symbol conversions, existing RELA and optional-PLT regressions | Passed, sanitizer errors fatal | | Same Linux host, GCC 13.3.0, Release and ASan/UBSan | Existing `core/libs/tests/Mspace.cpp`, linked directly with production `Mspace.cpp` and `Process.cpp` | Passed; near-maximum ordinary/aligned failures retain bytes, usable size, statistics and subsequent resize/free/reuse | | Unpatched main Release binary | New symbol suite | Expected failure: 16 rejected assertions, including 4 incorrectly completed Linux outputs | Commands (same relinker configuration on both hosts): ```sh cmake -S . -B build-relinker -G Ninja -DCMAKE_BUILD_TYPE=Release -DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON cmake --build build-relinker --parallel 6 ctest --test-dir build-relinker --output-on-failure --timeout 120 python core/relinker/relinker/tests/test_symbol_ranges.py build-relinker/core/relinker/relinker python tools/check_conventions.py --base origin/main git diff --check ``` On Windows the binary is `relinker.exe`. The instrumented executable was built from the same `core/relinker` CMake target in a temporary parent project with `-fsanitize=address,undefined -fno-omit-frame-pointer -fno-pie`, dynamic linking and `-no-pie`; `ASAN_OPTIONS=detect_leaks=1:halt_on_error=1` and `UBSAN_OPTIONS=halt_on_error=1`. No sanitizer infrastructure is added to the repository (#1669 owns that work). Allocator command from the repository root: ```sh g++ -O3 -DNDEBUG -std=c++20 -ffunction-sections -fdata-sections -pthread -Icore/libs core/libs/tests/Mspace.cpp core/libs/prx/libc/src/Mspace.cpp core/libs/prx/libc/src/Process.cpp -Wl,--gc-sections -o /tmp/anyps5-mspace /tmp/anyps5-mspace ``` The sanitizer allocator build uses `-O2 -g -fsanitize=address,undefined -fno-omit-frame-pointer -fno-pie -no-pie` instead of `-O3 -DNDEBUG`. Native Windows allocator linking and the full system-library/title suite were not verified. <details> <summary>Reproducer for the two adjacent Linux gaps recorded in technical debt</summary> Run from the repository root, with the built relinker as the first argument. These cases are informational follow-ups and are not registered as regressions for this change. Main and this documentation/test branch both accept the malformed Linux images; Windows rejects them. This demonstrates wrong-source translation/output validity, not a newly established out-of-buffer read or title crash. ```python import struct import subprocess import sys import tempfile from pathlib import Path sys.path.insert(0, 'core/relinker/relinker/tests') from test_symbol_ranges import fixture, set_tag relinker = str(Path(sys.argv[1]).resolve()) with tempfile.TemporaryDirectory() as directory: for name, offset, address, size in ( ('file-offset-wrap', 0xfffffffffffff000, 0x2000, 0x2000), ('segment-end-wrap', 0, 0xfffffffffffff000, 0), ): image = fixture() struct.pack_into('<H', image, 0x38, 6) struct.pack_into('<IIQQQQQQ', image, 64 + 5 * 56, 0x6fffff01, 0, 0, 0, 0, 0, 0, 1) struct.pack_into('<IIQQQQQQ', image, 176, 1, 4, offset, address, address, size, 0x2000, 0x1000) if size: set_tag(image, 5, 0x3600) source = Path(directory) / (name + '.elf') source.write_bytes(image) for mode in ([], ['--windows']): output = Path(directory) / (name + ('.exe' if mode else '.out')) result = subprocess.run([relinker, '--skip-sce-module', *mode, str(source), str(output)], capture_output=True, text=True, timeout=20) print(name, mode, result.returncode, output.exists(), result.stderr) ``` Observed for both cases: Linux `exit=0 output=True`. Windows: `exit=2 output=False`, respectively `Invalid PT_LOAD file range` and `PT_LOAD address overflow`. Source locations are linked in `docs/dev/TechnicalDebt.md`; the invalid load headers are retained in the Linux output. </details> ### Checklist - [x] Based on current `main`; complementary changes extend #1272, whose original prerequisite commit is included with attribution - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw; no silent stubs added - [x] No notes, investigation `.md` files or images added to the repository; durable documentation updates existing developer files - [x] New third-party code is a submodule built from source (none added) - [x] Generic behaviour, not specific to one title - [x] Depends on: #1272; original prerequisite commits are included so CI tests the complete stack; scheduling fix is already on main through #1715 - [x] AI-assisted: yes
Sanjaysrinivas commented 2026-10-08 17:20:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Sanjaysrinivas on 2026-10-08T17:20:19Z.


Follow-up to the overlap report, addressed at b8940e8d55a01a42ca5d2a0a36f2fcdb133ccdfe:

  • #1446: the conflict was the shared CMake insertion point. Moved the included dynamic_table_bounds registration within its existing Linux-only condition, preserving the target and test. git merge-tree --write-tree HEAD origin/pr-1446 now succeeds against #1446 head 4da534fed782d12444f4c3f016e2b333dde15438. Its RELA table-range fix is independent of these symbol regressions, so it is not a dependency.
  • #1682: this proposes an alternative symbol guard to #1272, whose original commit is already included and explicitly declared as our prerequisite. The guards conflict and should not be stacked unchanged. This branch retains Depends on #1272; if upstream chooses #1682 instead, rebase the complementary tests/documentation onto that merged fix and remove the #1272 prerequisite. No second bounds implementation was added here.
  • Synced with upstream main 7995d6578d289310c25b8e104119c8bbfabb14f9, while retaining #1272's original authorship/history. Updated the PR description with this coordination and the latest tested commit.

Validation on the pushed head: full Release relinker suites 40/40 Linux (Ubuntu 24.04/WSL2, GCC 13.3) and 37/37 Windows (MinGW-w64 GCC 15.2), both with ctest --parallel 6 --output-on-failure --timeout 120. The 86 symbol conversions pass on both hosts. Conventions and git diff --check pass. The updated head starts a fresh GitHub CI run; earlier successful checks apply to the previous head.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6065286272 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1690#issuecomment-6065286272). Originally posted by [Sanjaysrinivas](https://github.com/Sanjaysrinivas) on 2026-10-08T17:20:19Z. --- Follow-up to the overlap report, addressed at `b8940e8d55a01a42ca5d2a0a36f2fcdb133ccdfe`: - **#1446:** the conflict was the shared CMake insertion point. Moved the included `dynamic_table_bounds` registration within its existing Linux-only condition, preserving the target and test. `git merge-tree --write-tree HEAD origin/pr-1446` now succeeds against #1446 head `4da534fed782d12444f4c3f016e2b333dde15438`. Its RELA table-range fix is independent of these symbol regressions, so it is not a dependency. - **#1682:** this proposes an alternative symbol guard to #1272, whose original commit is already included and explicitly declared as our prerequisite. The guards conflict and should not be stacked unchanged. This branch retains **Depends on #1272**; if upstream chooses #1682 instead, rebase the complementary tests/documentation onto that merged fix and remove the #1272 prerequisite. No second bounds implementation was added here. - Synced with upstream main `7995d6578d289310c25b8e104119c8bbfabb14f9`, while retaining #1272's original authorship/history. Updated the PR description with this coordination and the latest tested commit. Validation on the pushed head: full Release relinker suites **40/40 Linux** (Ubuntu 24.04/WSL2, GCC 13.3) and **37/37 Windows** (MinGW-w64 GCC 15.2), both with `ctest --parallel 6 --output-on-failure --timeout 120`. The 86 symbol conversions pass on both hosts. Conventions and `git diff --check` pass. The updated head starts a fresh GitHub CI run; earlier successful checks apply to the previous head.
Dextroid17 commented 2026-10-08 17:40:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-08T17:40:06Z.


Verified on Linux against today's main (2b297842), replaying the declared order, and the key result is that your two new tests genuinely gate the bound rather than merely passing beside it.

Replay and build

  merge #1272 onto main        no conflicts        (3 files, +69/-1)
  merge #1690 on top           no conflicts        (4 files, +178/-5)
  build                        clean
  registration                 symbol_ranges (ctest #441) and dynamic_table_bounds (#467)
                               both appear only after a reconfigure, since add_test lands
                               in CTestTestfile.cmake at configure time
  both new tests               Passed
  full relinker suite, Linux   38/38 passed in 5.3 s

Negative control — the part I actually care about. Implementation reverted to main's if (symOff + 4 > raw.size()), both new tests kept:

  1/2 Test #441: symbol_ranges ...........***Failed
  2/2 Test #467: dynamic_table_bounds ....***Failed
  0% tests passed, 2 tests failed out of 2
  restored (bound and tests)             ->  100% passed out of 2

So the wrapped base + index * 24 cases you added fail on the unbounded code, which is what a regression for this fix has to do.

Coverage is real, not decorative. The fixture labels in test_symbol_ranges.py cover base-max, base-max-minus-one, base-past-eof, indexed-past-eof, indexed-wrap, indexed-wrap-to-valid-name, index-max, name-at-eof, name-one-byte, name-two-bytes, name-three-bytes, name-outside-strsz, the sysv-/os-/plt- tag families, and an unchanged-relative-control plus --registry path. That matches the DT_SYMENT/st_name-only reasoning in the ARCHITECTURE.md text — in particular that a readable st_name ending exactly at EOF passes import lookup, which is the subtlest of the boundary cases and is asserted rather than described.

The bot's overlap flag is stale. git merge-tree --write-tree <merged pair> pr-1446 exits 0 with zero conflicts against #1446's head, so the CMake insertion-point issue you addressed at b8940e8d holds up. (#1682's overlap is moot: @MarcZX100 closed it as a duplicate of #1272.)

One process note, not a code issue. The rollup shows relinker green on ubuntu/windows/macos, and linux/windows empty — those are the two Build jobs, which is the action_required state, not a failure: a fork's pull_request run waits for a maintainer to approve it (issue #1631 counts 38 heads in that state today). So the UNSTABLE merge status is purely the unapproved runs.

This depends on #1272, so it should land after it; the pair applies in that order without conflict on current main.

Written with AI assistance.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6065622938 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1690#issuecomment-6065622938). Originally posted by [Dextroid17](https://github.com/Dextroid17) on 2026-10-08T17:40:06Z. --- Verified on Linux against today's `main` (`2b297842`), replaying the declared order, and the key result is that your two new tests genuinely gate the bound rather than merely passing beside it. **Replay and build** ``` merge #1272 onto main no conflicts (3 files, +69/-1) merge #1690 on top no conflicts (4 files, +178/-5) build clean registration symbol_ranges (ctest #441) and dynamic_table_bounds (#467) both appear only after a reconfigure, since add_test lands in CTestTestfile.cmake at configure time both new tests Passed full relinker suite, Linux 38/38 passed in 5.3 s ``` **Negative control — the part I actually care about.** Implementation reverted to `main`'s `if (symOff + 4 > raw.size())`, both new tests kept: ``` 1/2 Test #441: symbol_ranges ...........***Failed 2/2 Test #467: dynamic_table_bounds ....***Failed 0% tests passed, 2 tests failed out of 2 restored (bound and tests) -> 100% passed out of 2 ``` So the wrapped `base + index * 24` cases you added fail on the unbounded code, which is what a regression for this fix has to do. **Coverage is real, not decorative.** The fixture labels in `test_symbol_ranges.py` cover `base-max`, `base-max-minus-one`, `base-past-eof`, `indexed-past-eof`, `indexed-wrap`, `indexed-wrap-to-valid-name`, `index-max`, `name-at-eof`, `name-one-byte`, `name-two-bytes`, `name-three-bytes`, `name-outside-strsz`, the `sysv-`/`os-`/`plt-` tag families, and an `unchanged-relative-control` plus `--registry` path. That matches the `DT_SYMENT`/`st_name`-only reasoning in the `ARCHITECTURE.md` text — in particular that a readable `st_name` ending exactly at EOF passes import lookup, which is the subtlest of the boundary cases and is asserted rather than described. **The bot's overlap flag is stale.** `git merge-tree --write-tree <merged pair> pr-1446` exits 0 with zero conflicts against #1446's head, so the CMake insertion-point issue you addressed at `b8940e8d` holds up. (#1682's overlap is moot: @MarcZX100 closed it as a duplicate of #1272.) **One process note, not a code issue.** The rollup shows `relinker` green on ubuntu/windows/macos, and `linux`/`windows` **empty** — those are the two Build jobs, which is the `action_required` state, not a failure: a fork's `pull_request` run waits for a maintainer to approve it (issue #1631 counts 38 heads in that state today). So the `UNSTABLE` merge status is purely the unapproved runs. This depends on #1272, so it should land after it; the pair applies in that order without conflict on current `main`. Written with AI assistance.
Sanjaysrinivas commented 2026-10-08 17:44:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Sanjaysrinivas on 2026-10-08T17:44:33Z.


The Linux CI failure is addressed, and all current applicable checks pass on 1a8de5e4193ed07edb27ea7c9dde25d031573e1e.

The failed job compiled successfully but timed out in the unchanged agc_driver_flat_store GPU test at 120.09 s after CI enabled parallel testing. Main had already taken 117.11 s on that test's first execution; subsequent executions took 8-10 s. The same test previously took 73.10 s under serial scheduling. These timings are consistent with costly cold software-GPU compilation under CPU contention, rather than a symbol-bounds failure.

The one-line CTest isolation change lives in separate draft #1717 and is included here as an explicit prerequisite, preserving one-topic review. It leaves the byte checks, all dispatches, repetitions and 120-second timeout intact. Both prerequisites are now listed: Depends on #1272 and #1717. Rebase away their included commits once they merge.

Validation of the complete stack:

  • Full Linux CI: zero failures out of 469 tests; three repetitions, SPIRV-Tools enabled. Flat store passed in 68.07 s, 6.03 s and 6.06 s.
  • Full Windows CI: zero failures out of 459 tests; three repetitions.
  • Relinker CI passes on Ubuntu, Windows and macOS; conventions and progress report also pass.

Capability-based GPU skips remain visible. #1717 also passes its independent full Linux and Windows checks. The PR description now records the latest commit, dependency and results.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6065698701 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1690#issuecomment-6065698701). Originally posted by [Sanjaysrinivas](https://github.com/Sanjaysrinivas) on 2026-10-08T17:44:33Z. --- The Linux CI failure is addressed, and all current applicable checks pass on `1a8de5e4193ed07edb27ea7c9dde25d031573e1e`. The failed job compiled successfully but timed out in the unchanged `agc_driver_flat_store` GPU test at 120.09 s after CI enabled parallel testing. Main had already taken 117.11 s on that test's first execution; subsequent executions took 8-10 s. The same test previously took 73.10 s under serial scheduling. These timings are consistent with costly cold software-GPU compilation under CPU contention, rather than a symbol-bounds failure. The one-line CTest isolation change lives in separate draft #1717 and is included here as an explicit prerequisite, preserving one-topic review. It leaves the byte checks, all dispatches, repetitions and 120-second timeout intact. Both prerequisites are now listed: **Depends on #1272 and #1717**. Rebase away their included commits once they merge. Validation of the complete stack: - [Full Linux CI](https://github.com/boykopovar/AnyPS5/actions/runs/37817824741/job/113451194355): zero failures out of 469 tests; three repetitions, SPIRV-Tools enabled. Flat store passed in 68.07 s, 6.03 s and 6.06 s. - [Full Windows CI](https://github.com/boykopovar/AnyPS5/actions/runs/37817824741/job/113451194392): zero failures out of 459 tests; three repetitions. - Relinker CI passes on Ubuntu, Windows and macOS; conventions and progress report also pass. Capability-based GPU skips remain visible. #1717 also passes its independent full Linux and Windows checks. The PR description now records the latest commit, dependency and results.
oneandonlydean commented 2026-10-09 08:55:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T08:55:14Z.


Closing: these tests belong with the fix in #1272, and the branch carries merge commits and #1717's change. Once #1272 is in, a PR with only the tests, rebased onto main, is welcome.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6077712246 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1690#issuecomment-6077712246). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-09T08:55:14Z. --- Closing: these tests belong with the fix in #1272, and the branch carries merge commits and #1717's change. Once #1272 is in, a PR with only the tests, rebased onto main, is welcome.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!1690
No description provided.