Correct sense of unwind return address register range assertion
authorEd Maste <emaste@freebsd.org>
Thu, 13 Aug 2015 13:45:45 +0000 (13:45 +0000)
committerEd Maste <emaste@freebsd.org>
Thu, 13 Aug 2015 13:45:45 +0000 (13:45 +0000)
I encountered this on FreeBSD/arm64, and then found the same issue was
reported by Daniil Troshkov.

llvm-svn: 244892

libunwind/src/DwarfInstructions.hpp

index dfe45fb..ce90aa0 100644 (file)
@@ -170,7 +170,7 @@ int DwarfInstructions<A, R>::stepWithDwarf(A &addressSpace, pint_t pc,
       const int lastReg = R::lastDwarfRegNum();
       assert((int)CFI_Parser<A>::kMaxRegisterNumber > lastReg &&
              "register range too large");
-      assert(lastReg <= (int)cieInfo.returnAddressRegister &&
+      assert(lastReg >= (int)cieInfo.returnAddressRegister &&
              "register range does not contain return address register");
       for (int i = 0; i <= lastReg; ++i) {
         if (prolog.savedRegisters[i].location !=