fix(mods): a module's own address-taken functions are lift entries #1

Open
rainy wants to merge 1 commit from rainy/Longshot-module-gaps:fix/mods-taken-functions into mods/module-gaps
First-time contributor

Type: fix · Risk: low · Tested on: Linux (Omarchy, kernel 7.2.15; Intel Core Ultra 7 270K Plus; RTX 4090, driver 615.78.08) · Needs: a run on Windows, any GPU

TL;DR

A mod's code module without unwind tables can hand the address of one of its own functions to other code. The build never made those functions, so the first call through such an address stopped the game. This PR finds those functions by the instructions that take their address and builds them. A new game-free test fails without the fix and passes here. The full check suite on this branch has the same 38 failures as mods/module-gaps, and one more pass. It also ran in the game on Linux, in a full patched build on an earlier base of the same module-gaps commits.

Breakdown

  • Who it helps: players of a code mod whose module has no .eh_frame and passes its own functions as callbacks, such as sloperinaGZ 0.0.8's menus.
  • What was wrong: the lift's entries leave ADR and ADRP+ADD targets out and rely on .eh_frame for address-taken functions, and a stripped mod module has no .eh_frame.
  • What changes: for a mod's module without .eh_frame, the targets of its ADR and ADRP + ADD that start a function become lift entries.
  • What does not change: the game's own modules, and mod modules that have .eh_frame.
  • How it was checked: the new tests/test_exefs_module_taken.py passes here and fails with the fix reverted. tests/test_exefs_modules.py still passes. python -I -B tests/run_all.py --jobs 8 has the same 38 failures as mods/module-gaps and one more pass. It also ran in the game on Linux, in a full patched build on an earlier base of the same module-gaps commits.
  • What is still open: a run on Windows.
  • Risk: low. A wrong guess adds an extra lift entry inside a mod's module, which costs build time and nothing else.

Why

I found this while running a code mod, sloperinaGZ 0.0.8 (https://github.com/PracticeROM/sloperina/releases/tag/v0.0.8), on this branch. Its subsdk9 has no .eh_frame. It hands its menu callbacks to its menu code with ADRP+ADD, and 132 of those targets had no function in the build. Opening its settings menu called one at +0x28400, and the game stopped with a64_icall: an indirect call to an address with no function. Its frame advance icon hit the same crash at +0x43e80, where the compiler hoisted the ADRP out of a loop and the ADD came 62 instructions later.

The game's own address-taken functions all have .eh_frame entries, so main never needed this. A mod built without unwind tables is ordinary, so any such mod with callbacks hits it. ADRP and ADD are the A64 way to form a code address, per the Arm Architecture Reference Manual's ADRP and ADD (immediate) pages.

This PR targets snaildev99's mods/module-gaps at 2756bd26, not main, because nx2/exefs_modules.py exists only in that stack (#984). I searched the tracker for eh_frame, ADRP and taken: no issue or PR covers it.

How to reproduce

Seen on: Linux, RTX 4090, driver 615.78.08. The crash does not depend on the GPU.
Settings and switches: defaults, with sloperinaGZ 0.0.8 in the mods folder
Steps: build the game with the mod on mods/module-gaps, start it, and open the mod's settings menu.
Expected: the menu opens.
Actual: the game stops with a64_icall: an indirect call to an address with no function.

What changed

entries() in nx2/exefs_modules.py adds a mod module's own address-taken functions when the module has no .eh_frame.

  • mods: new taken_functions(module) in nx2/exefs_modules.py scans the module's code for ADR, and for ADRP followed by ADD #imm on the same register. It looks for the ADD up to the function's RET, at most 1024 instructions, and stops where the register is set again. A target counts only where a function starts: 16-byte aligned, after padding, a RET, a B or a BR. entries() adds these for each mod module without .eh_frame and logs how many it found.
  • tests: new tests/test_exefs_module_taken.py builds a made-up module and checks which targets are taken and which are not, including an ADD 61 instructions after its ADRP and an ADD after a RET.

On sloperinaGZ 0.0.8 the scan finds 280 functions. Every RELATIVE relocation into its code was an entry already.

Measurements

Nothing to measure. The scan runs once per mod module at build time, and the game's modules skip it.

Flags and settings

None

Testing

Tested: game-free tests on Linux with gcc, on this branch at 58c66d01:

  • python -I -B tests/test_exefs_module_taken.py passes.
  • With nx2/exefs_modules.py reverted to mods/module-gaps, it fails with AttributeError: module 'exefs_modules' has no attribute 'taken_functions'.
  • With the old search put back (16 instructions, no stop at a RET), it fails with the taken functions: ['0x10', '0x100', '0x380', '0x80', '0xc0']. It misses the hoisted ADRP's target, 0x300, and takes 0x380, whose ADD comes after a RET.
  • python -I -B tests/test_exefs_modules.py passes here and on mods/module-gaps.

python -I -B tests/run_all.py --jobs 8 on Linux (Omarchy, kernel 7.2.15; Intel Core Ultra 7 270K Plus; RTX 4090, driver 615.78.08). mods/module-gaps @ 2756bd26: 686 passed, 38 failed, 97 skipped. this branch @ 58c66d01: 687 passed, 38 failed, 97 skipped, 0 new failures compared by test name. The 38 failures also fail on mods/module-gaps at 2756bd26. They are:

Tests that also fail on mods/module-gaps @ 2756bd26 in this environment
  • tests/test_bug_report_defaults.py
  • tests/test_capture_read_once.py
  • tests/test_cpu_report.py
  • tests/test_crash_record.py
  • tests/test_crt_options.py
  • tests/test_damage_debug_menu.py
  • tests/test_dev_packs.py
  • tests/test_display_startup_failure.py
  • tests/test_dlss_feature_size.py
  • tests/test_failed_compile_keeps_objects.py
  • tests/test_guest_imported.py
  • tests/test_high_fps_fixes.py
  • tests/test_host_guest_writes.py
  • tests/test_hud_layout_row.py
  • tests/test_invalidate_quick.py
  • tests/test_invalidate_vcore.py
  • tests/test_libc_hooks.py
  • tests/test_link_path_comma.py
  • tests/test_linux_preflight.py
  • tests/test_linux_pressure.py
  • tests/test_linux_update.py
  • tests/test_log_open_failure.py
  • tests/test_missing_nup.py
  • tests/test_mods_size_table.py
  • tests/test_pending_guest_import.py
  • tests/test_pipeline_play_cache.py
  • tests/test_prepare_cache_save.py
  • tests/test_present_thread.py
  • tests/test_profiling_mode.py
  • tests/test_psychov35_fsr3_fg.py
  • tests/test_readback_timeout_source.py
  • tests/test_run_all_changed.py
  • tests/test_slow_frames.py
  • tests/test_song_note_cue.py
  • tests/test_switch_table.py
  • tests/test_upscaler_rows.py
  • tests/test_walk_key.py
  • tests/test_vbytes.py (timed out at 600 s)

In the game, on Linux with an RTX 4090, this fix ran as part of a full patched build: all the fixes together, on an earlier base of the same module-gaps commits (ed1a8513). The settings menu and frame advance stops were not seen again, and everything tried in the mod worked. It was not run alone in the game on this exact branch.

Not tested: Windows (no build or run there) and other GPUs.

Must be tested:

  • Windows, any GPU: the same build and steps, expecting the same result (Test Farm: @Beanstalk windows, build with a code mod and open its menu)

Testing with sloperinaGZ

This branch alone isn't enough to use sloperinaGZ in the game. The in-game run above also had these fixes applied:

  • #1683 fix(svc): svcQueryMemory free-range answer
  • #1684 fix(hid): stick direction pseudo-buttons. Without it, the mod's menu combo (R + right stick down) never fires.
  • #1685 fix(nvn): window origin and depth mode getters
  • #1686 fix(lift): SCVTF / UCVTF fixed-point
  • #2 and #3 here

A branch with all of them applied together: https://git.magicbean.dev/rainy/Longshot/src/branch/longslop-rc8

Risks

What could break: a data word that looks like an ADRP+ADD pair could add an extra entry inside a mod's module. That costs build time and nothing else. The game's modules are not scanned.

Turning it off: revert the commit

Compatibility: a build with a mod module without .eh_frame lifts again, because the lift's entries change. Nothing else changes.

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what
    can't be run by hand is in Testing's Not testable by hand, with why.
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and
    in Risks.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main. This PR targets snaildev99's mods/module-gaps, not main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named). The failures named below also fail on mods/module-gaps at 2756bd26, which is this PR's base.
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • A game-free test added for the fix, failing on main and passing here.
  • A check under tests/ that reads changed source updated in this PR, not weakened.
**Type:** fix · **Risk:** low · **Tested on:** Linux (Omarchy, kernel 7.2.15; Intel Core Ultra 7 270K Plus; RTX 4090, driver 615.78.08) · **Needs:** a run on Windows, any GPU ## TL;DR A mod's code module without unwind tables can hand the address of one of its own functions to other code. The build never made those functions, so the first call through such an address stopped the game. This PR finds those functions by the instructions that take their address and builds them. A new game-free test fails without the fix and passes here. The full check suite on this branch has the same 38 failures as `mods/module-gaps`, and one more pass. It also ran in the game on Linux, in a full patched build on an earlier base of the same module-gaps commits. ## Breakdown - **Who it helps:** players of a code mod whose module has no .eh_frame and passes its own functions as callbacks, such as sloperinaGZ 0.0.8's menus. - **What was wrong:** the lift's entries leave ADR and ADRP+ADD targets out and rely on .eh_frame for address-taken functions, and a stripped mod module has no .eh_frame. - **What changes:** for a mod's module without .eh_frame, the targets of its ADR and ADRP + ADD that start a function become lift entries. - **What does not change:** the game's own modules, and mod modules that have .eh_frame. - **How it was checked:** the new `tests/test_exefs_module_taken.py` passes here and fails with the fix reverted. `tests/test_exefs_modules.py` still passes. `python -I -B tests/run_all.py --jobs 8` has the same 38 failures as `mods/module-gaps` and one more pass. It also ran in the game on Linux, in a full patched build on an earlier base of the same module-gaps commits. - **What is still open:** a run on Windows. - **Risk:** low. A wrong guess adds an extra lift entry inside a mod's module, which costs build time and nothing else. ## Why I found this while running a code mod, sloperinaGZ 0.0.8 (https://github.com/PracticeROM/sloperina/releases/tag/v0.0.8), on this branch. Its `subsdk9` has no .eh_frame. It hands its menu callbacks to its menu code with ADRP+ADD, and 132 of those targets had no function in the build. Opening its settings menu called one at +0x28400, and the game stopped with `a64_icall: an indirect call to an address with no function`. Its frame advance icon hit the same crash at +0x43e80, where the compiler hoisted the ADRP out of a loop and the ADD came 62 instructions later. The game's own address-taken functions all have .eh_frame entries, so main never needed this. A mod built without unwind tables is ordinary, so any such mod with callbacks hits it. ADRP and ADD are the A64 way to form a code address, per the Arm Architecture Reference Manual's ADRP and ADD (immediate) pages. This PR targets snaildev99's `mods/module-gaps` at 2756bd26, not main, because `nx2/exefs_modules.py` exists only in that stack (#984). I searched the tracker for eh_frame, ADRP and taken: no issue or PR covers it. ## How to reproduce **Seen on:** Linux, RTX 4090, driver 615.78.08. The crash does not depend on the GPU. **Settings and switches:** defaults, with sloperinaGZ 0.0.8 in the mods folder **Steps:** build the game with the mod on `mods/module-gaps`, start it, and open the mod's settings menu. **Expected:** the menu opens. **Actual:** the game stops with `a64_icall: an indirect call to an address with no function`. ## What changed `entries()` in `nx2/exefs_modules.py` adds a mod module's own address-taken functions when the module has no .eh_frame. - mods: new `taken_functions(module)` in `nx2/exefs_modules.py` scans the module's code for ADR, and for ADRP followed by ADD #imm on the same register. It looks for the ADD up to the function's RET, at most 1024 instructions, and stops where the register is set again. A target counts only where a function starts: 16-byte aligned, after padding, a RET, a B or a BR. `entries()` adds these for each mod module without .eh_frame and logs how many it found. - tests: new `tests/test_exefs_module_taken.py` builds a made-up module and checks which targets are taken and which are not, including an ADD 61 instructions after its ADRP and an ADD after a RET. On sloperinaGZ 0.0.8 the scan finds 280 functions. Every RELATIVE relocation into its code was an entry already. ## Measurements Nothing to measure. The scan runs once per mod module at build time, and the game's modules skip it. ### Flags and settings None ## Testing **Tested:** game-free tests on Linux with gcc, on this branch at 58c66d01: - `python -I -B tests/test_exefs_module_taken.py` passes. - With `nx2/exefs_modules.py` reverted to `mods/module-gaps`, it fails with `AttributeError: module 'exefs_modules' has no attribute 'taken_functions'`. - With the old search put back (16 instructions, no stop at a RET), it fails with `the taken functions: ['0x10', '0x100', '0x380', '0x80', '0xc0']`. It misses the hoisted ADRP's target, 0x300, and takes 0x380, whose ADD comes after a RET. - `python -I -B tests/test_exefs_modules.py` passes here and on `mods/module-gaps`. `python -I -B tests/run_all.py --jobs 8` on Linux (Omarchy, kernel 7.2.15; Intel Core Ultra 7 270K Plus; RTX 4090, driver 615.78.08). `mods/module-gaps` @ 2756bd26: 686 passed, 38 failed, 97 skipped. this branch @ 58c66d01: 687 passed, 38 failed, 97 skipped, 0 new failures compared by test name. The 38 failures also fail on `mods/module-gaps` at 2756bd26. They are: <details> <summary>Tests that also fail on mods/module-gaps @ 2756bd26 in this environment</summary> - `tests/test_bug_report_defaults.py` - `tests/test_capture_read_once.py` - `tests/test_cpu_report.py` - `tests/test_crash_record.py` - `tests/test_crt_options.py` - `tests/test_damage_debug_menu.py` - `tests/test_dev_packs.py` - `tests/test_display_startup_failure.py` - `tests/test_dlss_feature_size.py` - `tests/test_failed_compile_keeps_objects.py` - `tests/test_guest_imported.py` - `tests/test_high_fps_fixes.py` - `tests/test_host_guest_writes.py` - `tests/test_hud_layout_row.py` - `tests/test_invalidate_quick.py` - `tests/test_invalidate_vcore.py` - `tests/test_libc_hooks.py` - `tests/test_link_path_comma.py` - `tests/test_linux_preflight.py` - `tests/test_linux_pressure.py` - `tests/test_linux_update.py` - `tests/test_log_open_failure.py` - `tests/test_missing_nup.py` - `tests/test_mods_size_table.py` - `tests/test_pending_guest_import.py` - `tests/test_pipeline_play_cache.py` - `tests/test_prepare_cache_save.py` - `tests/test_present_thread.py` - `tests/test_profiling_mode.py` - `tests/test_psychov35_fsr3_fg.py` - `tests/test_readback_timeout_source.py` - `tests/test_run_all_changed.py` - `tests/test_slow_frames.py` - `tests/test_song_note_cue.py` - `tests/test_switch_table.py` - `tests/test_upscaler_rows.py` - `tests/test_walk_key.py` - `tests/test_vbytes.py` (timed out at 600 s) </details> In the game, on Linux with an RTX 4090, this fix ran as part of a full patched build: all the fixes together, on an earlier base of the same module-gaps commits (ed1a8513). The settings menu and frame advance stops were not seen again, and everything tried in the mod worked. It was not run alone in the game on this exact branch. **Not tested:** Windows (no build or run there) and other GPUs. **Must be tested:** - Windows, any GPU: the same build and steps, expecting the same result (Test Farm: @Beanstalk windows, build with a code mod and open its menu) **Testing with sloperinaGZ** This branch alone isn't enough to use sloperinaGZ in the game. The in-game run above also had these fixes applied: - [#1683](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1683) fix(svc): svcQueryMemory free-range answer - [#1684](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1684) fix(hid): stick direction pseudo-buttons. Without it, the mod's menu combo (R + right stick down) never fires. - [#1685](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1685) fix(nvn): window origin and depth mode getters - [#1686](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1686) fix(lift): SCVTF / UCVTF fixed-point - [#2](https://git.magicbean.dev/snaildev99/Longshot/pulls/2) and [#3](https://git.magicbean.dev/snaildev99/Longshot/pulls/3) here A branch with all of them applied together: https://git.magicbean.dev/rainy/Longshot/src/branch/longslop-rc8 ## Risks **What could break:** a data word that looks like an ADRP+ADD pair could add an extra entry inside a mod's module. That costs build time and nothing else. The game's modules are not scanned. **Turning it off:** revert the commit **Compatibility:** a build with a mod module without .eh_frame lifts again, because the lift's entries change. Nothing else changes. ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what can't be run by hand is in Testing's Not testable by hand, with why. - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and in Risks. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [ ] Rebased on current `main`. This PR targets snaildev99's `mods/module-gaps`, not main. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). The failures named below also fail on `mods/module-gaps` at 2756bd26, which is this PR's base. - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] A game-free test added for the fix, failing on `main` and passing here. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened.
The lift's entries (hos/nx_image.py) leave ADR / ADRP+ADD targets out and
count on .eh_frame for functions whose address is taken. sloperinaGZ
0.0.8's subsdk9 has no .eh_frame and hands its menu callbacks to its
menu code by ADRP+ADD: 132 of them had no function, and opening its
settings menu called one (+0x28400), which stopped the game (a64_icall:
an indirect call to an address with no function).

For a mod's module without .eh_frame, entries() now adds the targets of
its ADR and ADRP + ADD #imm that start a function (16-byte aligned, after
padding, RET, B or BR). The ADD is looked for up to the function's RET (at
most 1024 instructions), stopping where the register is set again: a
compiler may hoist the ADRP out of a loop, and sloperinaGZ's frame advance
icon hands its paint function (+0x43e80) on from an ADD 62 instructions
after its ADRP. On that module this finds 280 functions; every RELATIVE
relocation into its code was an entry already. The game's modules are
unchanged.

tests/test_exefs_module_taken.py checks the scan on a made-up module.

Assisted-by: Grok Bot
Owner

Thank you for this, and for running a real mod on the branch: that is exactly the kind of case it had not met. I'd like to take it, with one change to the scan first.

Windows run (Windows 11, the builder's clang): tests/test_exefs_module_taken.py passes at 58c66d01 and fails with the fix reverted; tests/test_exefs_modules.py still passes. It merges with your other two without conflict. No run in the game on Windows yet (I have not built with sloperinaGZ).

What I'd change before merging (medium): the forward search for the ADD (nx2/exefs_modules.py:189) stops only when the register is set again by an ADR or ADRP. A probe against this code took three targets it should not:

  • an ADD on the register after an ldr x8, [x0] or mov x8, x0 had rewritten it;
  • GCC's jump-table base label, which sits directly after its own br (adr x1, .L; add x1, x1, w0, sxtb #2; br x1; .L:) and so passes "after a BR" whenever it is 16-aligned;
  • an ADD in the next function, when a function ends in a tail call (b) and the search runs on to the next RET.

By the lifter's own model a wrong entry is still correct code (control reaching it tail-calls it), so this is extra code and a call where there was a fall-through, not a crash. But a jump-table base becoming an entry can land in a hot loop. Suggested: stop at any instruction that writes the register (as code_constants does for MOVZ), stop at an unconditional b as well, and accept "after BR" only for br x16 / br x17. The three cases above as "not taken" in the test would pin it.

Small: the description says the search stops where the register is set again and at the function's RET; both are a little wider in the code than that. And "costs build time and nothing else" should mention the possible tail call at run time.

Checked and fine: it applies only to a mod's module without .eh_frame; the lift's key covers both this file and the module's bytes, so no stale lift is reused.

Two practical notes for all three:

  • mods/module-gaps stays where it is (2756bd26) until these are in, so your branches keep their base. The branches under it are moving onto v3.0.0's main today; I will rebase this one after merging.
  • The commits are authored by a bot account. They will travel upstream with the stack, so tell me which name you want the credit under (CONTRIBUTING asks for the person as author and the assistant in an Assisted-by: trailer).

If you'd rather not do the follow-up yourself, say so and I will put it on top of your commit.

Thank you for this, and for running a real mod on the branch: that is exactly the kind of case it had not met. I'd like to take it, with one change to the scan first. **Windows run (Windows 11, the builder's clang):** `tests/test_exefs_module_taken.py` passes at 58c66d01 and fails with the fix reverted; `tests/test_exefs_modules.py` still passes. It merges with your other two without conflict. No run in the game on Windows yet (I have not built with sloperinaGZ). **What I'd change before merging (medium):** the forward search for the ADD (`nx2/exefs_modules.py:189`) stops only when the register is set again by an ADR or ADRP. A probe against this code took three targets it should not: - an ADD on the register after an `ldr x8, [x0]` or `mov x8, x0` had rewritten it; - GCC's jump-table base label, which sits directly after its own `br` (`adr x1, .L; add x1, x1, w0, sxtb #2; br x1; .L:`) and so passes "after a BR" whenever it is 16-aligned; - an ADD in the next function, when a function ends in a tail call (`b`) and the search runs on to the next RET. By the lifter's own model a wrong entry is still correct code (control reaching it tail-calls it), so this is extra code and a call where there was a fall-through, not a crash. But a jump-table base becoming an entry can land in a hot loop. Suggested: stop at any instruction that writes the register (as `code_constants` does for MOVZ), stop at an unconditional `b` as well, and accept "after BR" only for `br x16` / `br x17`. The three cases above as "not taken" in the test would pin it. **Small:** the description says the search stops where the register is set again and at the function's RET; both are a little wider in the code than that. And "costs build time and nothing else" should mention the possible tail call at run time. **Checked and fine:** it applies only to a mod's module without `.eh_frame`; the lift's key covers both this file and the module's bytes, so no stale lift is reused. Two practical notes for all three: - `mods/module-gaps` stays where it is (2756bd26) until these are in, so your branches keep their base. The branches under it are moving onto v3.0.0's main today; I will rebase this one after merging. - The commits are authored by a bot account. They will travel upstream with the stack, so tell me which name you want the credit under (CONTRIBUTING asks for the person as author and the assistant in an `Assisted-by:` trailer). If you'd rather not do the follow-up yourself, say so and I will put it on top of your commit.
Author
First-time contributor

Thanks for the careful review. The three cases are real gaps. Stopping at any write to the register is the right rule, since the scan only cares where the value came from, and limiting "after BR" to br x16/br x17 keeps it to PLT-style stubs. The jump-table case is the one I'd most want pinned in the test, since it's the one that could hit a hot loop. You're also right that the description undersold the run-time cost. Please go ahead and add your follow-ups as your own commits on top of ours, your way. For credit, my commits should be authored as rainy, with an Assisted-by: Grok Bot trailer.

Thanks for the careful review. The three cases are real gaps. Stopping at any write to the register is the right rule, since the scan only cares where the value came from, and limiting "after BR" to `br x16`/`br x17` keeps it to PLT-style stubs. The jump-table case is the one I'd most want pinned in the test, since it's the one that could hit a hot loop. You're also right that the description undersold the run-time cost. Please go ahead and add your follow-ups as your own commits on top of ours, your way. For credit, my commits should be authored as `rainy`, with an `Assisted-by: Grok Bot` trailer.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'fix/mods-taken-functions:rainy-fix/mods-taken-functions'
git switch 'rainy-fix/mods-taken-functions'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'mods/module-gaps'
git merge --no-ff 'rainy-fix/mods-taken-functions'
git switch 'rainy-fix/mods-taken-functions'
git rebase 'mods/module-gaps'
git switch 'mods/module-gaps'
git merge --ff-only 'rainy-fix/mods-taken-functions'
git switch 'rainy-fix/mods-taken-functions'
git rebase 'mods/module-gaps'
git switch 'mods/module-gaps'
git merge --no-ff 'rainy-fix/mods-taken-functions'
git switch 'mods/module-gaps'
git merge --squash 'rainy-fix/mods-taken-functions'
git switch 'mods/module-gaps'
git merge --ff-only 'rainy-fix/mods-taken-functions'
git switch 'mods/module-gaps'
git merge 'rainy-fix/mods-taken-functions'
git push origin 'mods/module-gaps'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
snaildev99/Longshot!1
No description provided.