Fix unwind from signal handler#25
Merged
alexey-milovidov merged 1 commit intoClickHouse:masterfrom May 15, 2024
Merged
Conversation
In case of this is frame of signal handler, the IP should be incremented, because the IP saved in the signal handler points to first non-executed instruction, while FDE/CIE expects IP to be after the first non-executed instruction.
| // incremented, because the IP saved in the signal handler points to | ||
| // first non-executed instruction, while FDE/CIE expects IP to be after | ||
| // the first non-executed instruction. | ||
| newRegisters.setIP(returnAddress + cieInfo.isSignalFrame); |
Member
There was a problem hiding this comment.
This can point in the middle between two instructions. Is this ok?
Member
Author
There was a problem hiding this comment.
This is only needed to execute proper CFI here -
Lines 430 to 434 in 854538c
So in other words, everything should be OK
alexey-milovidov
approved these changes
May 15, 2024
Member
alexey-milovidov
left a comment
There was a problem hiding this comment.
Let's give it a try.
This was referenced Jul 22, 2024
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In case of this is frame of signal handler, the IP should be incremented, because the IP saved in the signal handler points to first non-executed instruction, while FDE/CIE expects IP to be after the first non-executed instruction.
PR in upstream: llvm/llvm-project#92291