Conversation
Adding apply_callee_tinfo for apply to automatically recognise and change type if it is function call instruction
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b38e6b730c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d4bc33ec72
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (ida::instruction::is_call(ea)) { | ||
| if (!apply_callee_tinfo(ea, impl_->ti)) | ||
| return std::unexpected( | ||
| Error::sdk("apply_callee_tinfo failed", std::to_string(ea))); |
There was a problem hiding this comment.
Add fallback when callee typing preconditions are unmet
TypeInfo::apply now sends every is_call(ea) address to apply_callee_tinfo, but Hex-Rays documents that apply_callee_tinfo requires the caller address to belong to a function; call instructions outside a defined function (or addresses misclassified as call-like) will therefore fail this branch and return an SDK error, whereas the previous implementation still attempted apply_tinfo at that address. This is a behavior regression for valid apply() use cases on not-yet-functionized code and should fall back to apply_tinfo when callee application is not applicable or fails (https://python.docs.hex-rays.com/ida_typeinf/index.html#ida_typeinf.apply_callee_tinfo).
Useful? React with 👍 / 👎.
Adding apply_callee_tinfo for apply to automatically recognise and change type if it is function call instruction