-
Notifications
You must be signed in to change notification settings - Fork 852
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
context
gives wrong jump target for jalr ra, ra, -0x16
in RISC-V
#2173
Comments
I found the source of the bug in the code that handles resolving RISCV targets: Lines 97 to 103 in e812ef0
The call to Previously in the control flow we have already resolved the values of all register before/after emulation, so we can just access them immediately. Made a PR to fix this (and replaces two other such parse_register calls with direct access to the already-resolved register value). |
Thanks for reporting this. It should be fixed in #2177. Thanks @OBarronCS :) |
The jump target shown as annotation in the disassembly window is wrong:
Interestingly,
nearpc
shows the correct jump target:A workaround is
set emulate off
.test binary
Download test binary. I created it from:
version information
pwndbg version: a1ddb3c (my fork)
The text was updated successfully, but these errors were encountered: