Recompiler: a delay slot past the function end is replaced by a NOP
メンテナーはふだん 5 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with function_emitter.cpp:143-147 and trace how delay slots are decoded when a branch or jump ends a function range. Check how the ELF section provides the word at inst.address + 4, and compare that behavior with makeSyntheticDelaySlot. Done means the real delay instruction is preserved, or a warning identifies when a non-NOP word would be replaced.
索引モデルが issue の本文から書いたものです。
説明
When a branch or jump is the last instruction of a function's range, function_emitter.cpp:143-147 emits a synthetic NOP for its delay slot (makeSyntheticDelaySlot) instead of decoding the real word at inst.address + 4 from the ELF. Nothing is logged.
So any function start that lands on a delay slot silently drops that delay instruction from the owner. The fallback heuristics are fixed in the linked PR, but the same thing can still happen with starts from JAL targets, the entry point, symbols, DWARF or Ghidra maps.
Seen in FIFA Street 2 (SLUS-21369): a heuristic start at 0x202020 cut sub_00201FD8 right after jal 0x431c88. The delay-slot lw $a0, 0($v0) that loads the call argument was replaced by the NOP, the lookup returned null, and the main thread died on a virtual call at 0x202048.
Suggested fix: decode the real word from the section when the delay slot sits outside the range, or at least warn when that word is not a NOP.
Related PR: fix/delay-slot-function-starts
- 主要言語
- C++
- スター
- 3.3k
- フォーク
- 149
- 平均マージ
- 8時間 46分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ran-j/PS2Recomp のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
ran-j/PS2Recomp#393 · コメント 1 件 ·
メンテナーはふだん 5 日以内に返信
-
EE sceCdStatus stub always reports READ (6), hanging games that wait for PAUSE対応中かも @ahmedgamalalzatary が 14 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
メンテナーはふだん 5 日以内に返信
-
VU0 macro VSQI / VSQD: address and source registers swapped in generated code対応中かも @yanm1103 が 21 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 5 日以内に返信
-
Runtime: SampleTexture casts unbounded or NaN texture coordinates to int, which is undefined behaviour再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ran-j/PS2Recomp#273 · コメント 2 件 ·
メンテナーはふだん 5 日以内に返信
-
Build: /Qspectre- is MSVC-only and breaks every Release target under clang-cl対応中かも @ahmedgamalalzatary が 14 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 5 日以内に返信
ran-j/PS2Recomp の issue をすべて見る
似ている issue
-
documentation enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
QuantStack/git2cpp#203 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
BaptisteHudyma/Lamp-Da#588 ·
メンテナーはふだん 1 日以内に返信
-
bug macOS networking
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
docling-project/docling-parse#448 ·
メンテナーはふだん 5 日以内に返信