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

gnu C++ exception causes wrong function body range #1

Open
Escapingbug opened this issue May 29, 2023 · 0 comments
Open

gnu C++ exception causes wrong function body range #1

Escapingbug opened this issue May 29, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Escapingbug
Copy link

Original code:

#include <iostream>

int main() {
        try {
                throw std::logic_error("logic");
        } catch (std::logic_error &e) {
                std::cout << "hello world\n";
                std::cout << "got logic error: " << e.what() << "\n";
        }
        return 0;
}

GNU exception analyzer could successfully analyze the exception handlers, etc.
But the function ends at the wrong place:

Correctly analyzed try:

image

Correctly analyzed catch:

image

However the body range is incorrect:

image

This will cause strange reaction when clicking at listing after 0x1012b4, which will show an "undefined" function in the decompiler view, after manually setting the body range, everything goes to normal.

binary:
test_exc.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant