Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Parser] Lift undetermined jumps as comment #335

Closed
mm4rks opened this issue Sep 14, 2023 · 2 comments · Fixed by #336
Closed

[Parser] Lift undetermined jumps as comment #335

mm4rks opened this issue Sep 14, 2023 · 2 comments · Fixed by #336
Assignees
Labels
feature-request New feature or request

Comments

@mm4rks
Copy link
Collaborator

mm4rks commented Sep 14, 2023

Proposal

We ignore jumps that do not have a determined target. E.g.,

Pasted image 20230911134240

Our output:

long dbi_result_get_as_longlong_idx(long * arg1, int arg2) {
    if (*(*(arg1 + 56L) + ((unsigned int)(arg2 + -1) << 1)) > 5) {
        _error_handler(*arg1, -7);
        return 0L;
    }
}
// information for dynamic jump is missing.

Compared to BN HLIL:
Pasted image 20230911134110

Approach

To capture the lost information, check last instruction of leaf basic-blocks for jumps and create a comment.

@mm4rks mm4rks added the feature-request New feature or request label Sep 14, 2023
@mm4rks mm4rks self-assigned this Sep 14, 2023
@mm4rks
Copy link
Collaborator Author

mm4rks commented Sep 14, 2023

/cib

@github-actions
Copy link
Contributor

github-actions bot pushed a commit that referenced this issue Sep 14, 2023
0x6e62 added a commit that referenced this issue Sep 28, 2023
* Create draft PR for #335

* If we encounter a basic-block ending in a jump instruction and having no
outgoing edges, insert a comment.

Note: We do not resolve jump variable

---------

Co-authored-by: mm4rks <[email protected]>
Co-authored-by: Marvin Marks <[email protected]>
Co-authored-by: Niklas Bergmann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant