-
Notifications
You must be signed in to change notification settings - Fork 573
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#731 re-rel: Convert native rseq PC targets to instrs (#4023)
For i#731 with automatic re-relativization of absolute PC's, in d6f5fca we simply kept the hardcoded offset for intra-region branch targets in our native rseq copy. However, with subsequent mangling that offset can become incorrect and target the middle of an instruction, leading to a crash. We instead take the time to convert these PC targets to instr_t* targets. We also tweak the disassembly output to show the instr_t pointer value for level 3 instructions too, since jumps can target them as well as synthetic instructions. This helped with verifying and debugging this change. Tested on an inserted system call for locally forcing rseq restarts, which leads to system call mangling and crashes without this fix. Issue: #731, #2350
- Loading branch information
1 parent
d6f5fca
commit a57418c
Showing
2 changed files
with
34 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters