Skip to content

release/21.x: [libunwind] Fix return type of DwarfFDECache::findFDE() in definition (#146308) #150126

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

Open
wants to merge 1 commit into
base: release/21.x
Choose a base branch
from

Conversation

llvmbot
Copy link
Member

@llvmbot llvmbot commented Jul 22, 2025

Backport eb0d8f9

Requested by: @alexrp

@llvmbot
Copy link
Member Author

llvmbot commented Jul 22, 2025

@llvm/pr-subscribers-libunwind

Author: None (llvmbot)

Changes

Backport eb0d8f9

Requested by: @alexrp


Full diff: https://github.com/llvm/llvm-project/pull/150126.diff

1 Files Affected:

  • (modified) libunwind/src/UnwindCursor.hpp (+2-1)
diff --git a/libunwind/src/UnwindCursor.hpp b/libunwind/src/UnwindCursor.hpp
index 55db035e62040..9a1afd3721f5a 100644
--- a/libunwind/src/UnwindCursor.hpp
+++ b/libunwind/src/UnwindCursor.hpp
@@ -173,7 +173,8 @@ bool DwarfFDECache<A>::_registeredForDyldUnloads = false;
 #endif
 
 template <typename A>
-typename A::pint_t DwarfFDECache<A>::findFDE(pint_t mh, pint_t pc) {
+typename DwarfFDECache<A>::pint_t DwarfFDECache<A>::findFDE(pint_t mh,
+                                                            pint_t pc) {
   pint_t result = 0;
   _LIBUNWIND_LOG_IF_FALSE(_lock.lock_shared());
   for (entry *p = _buffer; p < _bufferUsed; ++p) {

@tru tru moved this from Needs Triage to Needs Review in LLVM Release Status Jul 24, 2025
@tru
Copy link
Collaborator

tru commented Jul 24, 2025

Who can review this?

@tru
Copy link
Collaborator

tru commented Jul 28, 2025

@alexrp can you rebase this one to get the fixes for libc++ ci, and we'll see if it works. @ldionne do you see any risks with this being merged to the release branch? I don't know who reviews libunwind, and I saw it was not reviewed for the main branch at all.

@alexrp
Copy link
Member

alexrp commented Jul 28, 2025

@alexrp can you rebase this one to get the fixes for libc++ ci, and we'll see if it works.

"Update with rebase" appears to not be enabled on the repo, so I did it with a merge commit. Hopefully that's fine since it gets squashed anyway.

FWIW, I consider this a pretty low-risk patch; I would expect identical machine code.

@tru
Copy link
Collaborator

tru commented Jul 28, 2025

"Update with rebase" appears to not be enabled on the repo, so I did it with a merge commit. Hopefully that's fine since it gets squashed anyway.

Unfortunately it doesn't get squashed when we merge to the repo. We use a custom script to merge to the release branch. You need to manually squash / rebase and push to the branch, but I'll handle it.

…on (llvm#146308)

Needed to resolve this compilation error on some systems:

lib/libunwind/src/UnwindCursor.hpp:153:38: error: return type of
out-of-line definition of 'libunwind::DwarfFDECache::findFDE' differs
from that in the declaration
    typename A::pint_t DwarfFDECache<A>::findFDE(pint_t mh, pint_t pc) {
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
lib/libunwind/src/libunwind.cpp:31:10: note: in file included from
lib/libunwind/src/libunwind.cpp:31:
    #include "UnwindCursor.hpp"
             ^
lib/libunwind/src/UnwindCursor.hpp:100:17: note: previous declaration is
here
      static pint_t findFDE(pint_t mh, pint_t pc);
             ~~~~~~~^

(cherry picked from commit eb0d8f9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Review
Development

Successfully merging this pull request may close these issues.

3 participants