[libunwind] Ensure zaDisable() is called in jumpto/returnto (NFC)#167674
Merged
[libunwind] Ensure zaDisable() is called in jumpto/returnto (NFC)#167674
Conversation
This is an NFC for now, as the SME checks for macOS platforms are not implemented, so zaDisable() is a no-op, but both paths for resuming from an exception should disable ZA. This is a fixup for a recent change in llvm#165066.
Member
|
@llvm/pr-subscribers-libunwind Author: Benjamin Maxwell (MacDue) ChangesThis is an NFC for now, as the SME checks for macOS platforms are not implemented, so zaDisable() is a no-op, but both paths for resuming from an exception should disable ZA. This is a fixup for a recent change in #165066. Full diff: https://github.com/llvm/llvm-project/pull/167674.diff 1 Files Affected:
diff --git a/libunwind/src/Registers.hpp b/libunwind/src/Registers.hpp
index 28649fafb23d5..45a2b0921ea3b 100644
--- a/libunwind/src/Registers.hpp
+++ b/libunwind/src/Registers.hpp
@@ -1862,16 +1862,13 @@ class _LIBUNWIND_HIDDEN Registers_arm64 {
v128 getVectorRegister(int num) const;
void setVectorRegister(int num, v128 value);
static const char *getRegisterName(int num);
+ void jumpto(unsigned walkedFrames = 0) {
+ zaDisable();
+ __libunwind_Registers_arm64_jumpto(this, walkedFrames);
+ }
#ifdef _LIBUNWIND_TRACE_RET_INJECT
_LIBUNWIND_TRACE_NO_INLINE
- void returnto(unsigned walkedFrames) {
- __libunwind_Registers_arm64_jumpto(this, walkedFrames);
- }
-#else
- void jumpto() {
- zaDisable();
- __libunwind_Registers_arm64_jumpto(this, 0);
- }
+ void returnto(unsigned walkedFrames) { jumpto(walkedFrames); }
#endif
static constexpr int lastDwarfRegNum() {
return _LIBUNWIND_HIGHEST_DWARF_REGISTER_ARM64;
|
This comment was marked as off-topic.
This comment was marked as off-topic.
Member
Yeah, that's why I didn't call in in |
medismailben
approved these changes
Nov 12, 2025
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.
This is an NFC for now, as the SME checks for macOS platforms are not implemented, so zaDisable() is a no-op, but both paths for resuming from an exception should disable ZA.
This is a fixup for a recent change in #165066.