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

backtrace.c doesn't handle correctly 64-bit addresses #496

Open
rasky opened this issue Feb 12, 2024 · 0 comments
Open

backtrace.c doesn't handle correctly 64-bit addresses #496

rasky opened this issue Feb 12, 2024 · 0 comments

Comments

@rasky
Copy link
Collaborator

rasky commented Feb 12, 2024

Currently, the back trace code in backtrace.c is designed for 32-bit addresses. All registers like $ra, $fp are tracked only as 32-bit addresses. It would have to be reworked to work in a full 64-bit context.

Notice that the stack is probably forced by the ABI to be a 32-bit address, as variables on the stack must be accessed with C pointers. I'm not sure about the code. Probably we have the same problem because of C function pointers.

Probably the only case that would make sense to handle is when the code is jumping to a corrupted 64-bit address (corrupted register), so that we show the full address in the exception screen / backtrace.

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

No branches or pull requests

1 participant