PE loader: skip export ordinals past u32::MAX (#691) #700
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!700
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-700"
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?
@towiice on GitHub · 2026-11-24 03:47 UTC · original
towiice:pe-export-ordinal-overflow→main· +22 −1 · 1 files · 1 commits · openFixes #691.
OwnedExports::from_peadded the export directory'sBase(read from the file) to each function index with plainu32addition. ABasenearu32::MAXpanicked on overflow in debug builds and wrapped to low ordinals in release builds, where the entry could shadow a real ordinal. The entry pastu32::MAXhas no ordinal, so it is now skipped (checked_add,break, since every later index overflows too). This is the fix proposed in #691; the test is the one from the issue, which I reran.What is in it
crates/xcl/src/pe.rs:checked_addfor the ordinal inOwnedExports::from_pe, plus the unit testexport_ordinals_past_u32_max_are_skipped.Tested
x86_64-pc-windows-gnullvm(llvm-mingw 20261117), debugattempt to add with overflow) and passes with itcargo build --workspacethencargo test --workspace --no-fail-fast -- --test-threads=4: 702 passed, 0 failed, 41 ignoredAlso tested by others
Regression run
Not made by me (I have no title). Anon64 made both runs with
scripts/smoke.ps1, same title and time, and posted them in a comment on this PR for this section; they are pasted unedited (RTX 3060, driver 581.80). Themainrun is oncb868b2, the base of this PR.main:
PR:
Not tested
AI use
@Anon64 on GitHub · 2026-11-24 07:01 UTC · original
Regression runs for this PR's head
95aab05and for its basemaincb868b2, on a retail title (same title, 60 s each), made withscripts/smoke.ps1(release, clean tree at each commit) and pasted unedited, for Regression run.main:
this PR:
Tested
Not tested
Report written with Claude Code (Claude Opus 5.5) from runs on this machine.
@futurepro62 on GitHub · 2026-11-24 07:06 UTC · original
Full-suite run to go with the smoke runs above, so the new test has a result on hardware. Tested exact head
95aab05(on its basecb868b2).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 686 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.export_ordinals_past_u32_max_are_skipped.Not tested
AI use
@DavidM1911 on GitHub · 2026-11-25 11:54 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.