Null return addresses can appear at the bottom of the stack (i.e. the
frame corresponding to the entry point). Authenticating these addresses
will set the error code in the address, which will lead to a segfault
in the sigreturn trampoline detection code. Fix this problem by not
authenticating null addresses.
Details
Details
- Reviewers
rprichard danielkiss mstorsjo - Group Reviewers
Restricted Project - Commits
- rGcddc53ef088b: libunwind: Don't attempt to authenticate a null return address.
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
It seems OK to me. Does it make sense to also skip (pc == 0) in UnwindCursor<A, R>::setInfoForSigReturn?
Comment Actions
Hmm, that seems redundant with the check that I'm adding here. Let's start with one and we can reconsider if we find another bug here.
Comment Actions
Oh, yeah, it would be redundant with this check earlier in setInfoBasedOnIPRegister:
// Exit early if at the top of the stack. if (pc == 0) { _unwindInfoMissing = true; return; }