[libunwind] r316224 - GNU: do not read the FDE count if omitted
Saleem Abdulrasool via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 20 11:47:35 PDT 2017
Author: compnerd
Date: Fri Oct 20 11:47:35 2017
New Revision: 316224
URL: http://llvm.org/viewvc/llvm-project?rev=316224&view=rev
Log:
GNU: do not read the FDE count if omitted
If there is no binary search table computed, the FDECount encoding is
DW_EH_PE_omit. Do not attempt to read the FDECount in such a situation
as we will read an incorrect value. binutils only writes out the
FDECount if the encoding is not DW_EH_PE_omit.
Modified:
libunwind/trunk/src/EHHeaderParser.hpp
Modified: libunwind/trunk/src/EHHeaderParser.hpp
URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/EHHeaderParser.hpp?rev=316224&r1=316223&r2=316224&view=diff
==============================================================================
--- libunwind/trunk/src/EHHeaderParser.hpp (original)
+++ libunwind/trunk/src/EHHeaderParser.hpp Fri Oct 20 11:47:35 2017
@@ -67,7 +67,9 @@ void EHHeaderParser<A>::decodeEHHdr(A &a
ehHdrInfo.eh_frame_ptr =
addressSpace.getEncodedP(p, ehHdrEnd, eh_frame_ptr_enc, ehHdrStart);
ehHdrInfo.fde_count =
- addressSpace.getEncodedP(p, ehHdrEnd, fde_count_enc, ehHdrStart);
+ fde_count_enc == DW_EH_PE_omit
+ ? 0
+ : addressSpace.getEncodedP(p, ehHdrEnd, fde_count_enc, ehHdrStart);
ehHdrInfo.table = p;
}
More information about the cfe-commits
mailing list