improper "add negative -> subtract" transformation with floating point
@rssor がすでに取り組んでいます。
2022年1月12日 から。
評価
この issue はまだ評価されていません。
説明
Version and Platform (required):
- Binary Ninja Version: 2.5.3140-dev (Build ID 532595b6)
- OS: macOS
- OS Version: 11.6
Steps To Reproduce:
Please provide all steps required to reproduce the behavior:
-
Open this binary.
-
Notice in HLIL:
00000000 uint64_t _start(float arg1 @ v0)
00000004 data_4000
0000001c return zx.q(int.d(arg1 - 0x41666666))
00000020 uint64_t sub_20(float arg1 @ v0)
00000024 data_4000
0000003c return zx.q(int.d(arg1 f+ 0x41666666))
Expected Behavior:
The functions are identical except for loading a different constant: one is "negative" 0x41666666, one is "positive" 0x41666666. In reality, both constants are used as 32-bit floats, not signed integers.
In the second function, Binary Ninja indicates that floating point addition is being used with f+ 0x41666666. But in the first function, Binary Ninja produces just - 0x41666666. This is wrong in two ways: it doesn't indicate that floating point is being used, and in any case arg1 f+ -0x41666666 (i.e. arg1 f+ 0xbe99999a, i.e. arg1 + -0.300000011921) is not equivalent to arg1 f- 0x41666666 (i.e. arg1 + 14.3999996185).
- 主要言語
- 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
-
難易度 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時間 初心者へのやさしさ 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
gazebosim/gz-sensors#662 · コメント 1 件 ·