Skip to content

Update type.cpp#4

Open
acheron2302 wants to merge 4 commits into19h:masterfrom
acheron2302:master
Open

Update type.cpp#4
acheron2302 wants to merge 4 commits into19h:masterfrom
acheron2302:master

Conversation

@acheron2302
Copy link
Copy Markdown

Adding apply_callee_tinfo for apply to automatically recognise and change type if it is function call instruction

acheron2302 and others added 3 commits April 16, 2026 23:59
Adding apply_callee_tinfo for apply to automatically recognise and change type if it is function call instruction
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/type.cpp Outdated
@acheron2302
Copy link
Copy Markdown
Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/type.cpp
Comment on lines +521 to +524
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)));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant