Lifting assistance with a conditional branch.
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
调研方向
No file or test is identified. Start by locating the lifting logic for conditional branches and the handling of pop(), cmp_ne(), set_reg(), and dangling IL statements. Define which obviously dangling statements should trigger a diagnostic, then add coverage showing that the conditional pop is detected and valid lifting remains unaffected.
由索引模型根据 Issue 内容生成。
描述
This is a feature request for sanity checks on some lifting.
I ran across a particular hard to debug instance of this. I am lifting a stack machine which has a conditional branch instruction that is something like:
if pop() != 0:
// true path
else:
// fall through
Originally, I lifted this by creating a cmp_ne(pop(), const(0)) expression. However, this is subtly incorrect -- the stack adjustment from the pop in the conditional will never be be applied as control flow passes to either the true or false branch before its committed. This is extremely hard to detect/debug, because by all appearances this initially looks correct: there is a conditional that does look at the top stack value, its just implemented as a peek() instead of a pop() in effect. The correct lifting for this ended up being something like set_reg(t0, pop()); cmp_ne(reg(t0), const(0)).
The feature request here is when there are some obviously dangling il statements that the user should be notified.
- 主要语言
- C++
- 星标
- 1.3k
- 派生
- 298
- 平均合并
- 5 天 5 小时
- 30 天内合并 PR
- 19
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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