diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-10-20 18:47:35 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-10-20 18:47:35 +0000 |
commit | 636914b6e849852c32cc52c51554b25bf1234f72 (patch) | |
tree | 0a98b81e32422501e16787c166699dde8eef5ed3 /libunwind | |
parent | 06a0c74d85c4b68f01210622737a61e60f6bd358 (diff) |
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.
Diffstat (limited to 'libunwind')
-rw-r--r-- | libunwind/src/EHHeaderParser.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libunwind/src/EHHeaderParser.hpp b/libunwind/src/EHHeaderParser.hpp index c66af211998..9bdaf5505ff 100644 --- a/libunwind/src/EHHeaderParser.hpp +++ b/libunwind/src/EHHeaderParser.hpp @@ -67,7 +67,9 @@ void EHHeaderParser<A>::decodeEHHdr(A &addressSpace, pint_t ehHdrStart, 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; } |