Setting a calling convention doesn't trigger argument locations to be redetermined
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- cpp
調査の方向性
Start with the calling-convention update path and inspect how current_function.type.parameters[0].location relates to bv.arch.get_reg_name(current_function.parameter_vars[0].storage). Reproduce the sequence of removing an explicit location and changing the calling convention; done means parameters using the default location move to the new convention's default location.
索引モデルが issue の本文から書いたものです。
説明
Version and Platform (required):
- Binary Ninja Version: 3.5.4390-dev
- OS: macOS
- OS Version: 13.5
- CPU Architecture: arm64
Bug Description:
Created a custom calling convention that took the first argument at x20 (this in Swift) and applied it, but it didn't work:
Explicit argument locations do work, however:
It turns out this is a little more complicated than 'it doesn't work', though. What appears to be happening is that:
- If you have the argument location at
x20first - ...and then edit the signature to remove the explicit argument location
- ...and then change the calling convention
- ...the argument won't be at
x20because the calling convention updates the type, but doesn't update the actual variables
Removing the explicit location changes the argument to the "default location" (x0, in this case) and then the update does not change the variable location even though the calling convention has changed in the type of the function. The variable in the type is still at "default location" but the variable in the analysis has not been changed to the "default location" of the new calling convention. Check current_function.type.parameters[0].location is None vs bv.arch.get_reg_name(current_function.parameter_vars[0].storage) to see that this is the case.
Expected Behavior:
Any time the calling convention has changed, it should update the parameter variable locations if they are set to the default location. It should update to use the default location in the new calling convention.
Additional Information:
Lots of thanks to @CouleeApps for figuring out what was actually happening here, since it appeared to be working non-deterministically before.
- 主要言語
- C++
- スター
- 1.3k
- フォーク
- 298
- 平均マージ
- 5日 5時間
- マージ済み PR(30日)
- 19
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Vector35/binaryninja-api のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
Vector35/binaryninja-api#8540 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Vector35/binaryninja-api#8516 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
Vector35/binaryninja-api#8503 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
Vector35/binaryninja-api#8446 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
Vector35/binaryninja-api#8444 ·
Vector35/binaryninja-api の issue をすべて見る
似ている issue
-
Website Doc Typo オープン
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
難易度 1/5 1〜3時間 初心者へのやさしさ 92/100
autowarefoundation/autoware_universe#13413 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
automated-analysis bug memory-safety
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100