From 74a8c13d2b2c0fdcd52e2c25d848256f0495dab9 Mon Sep 17 00:00:00 2001 From: gordon Date: Tue, 6 Aug 2019 17:08:30 +0000 Subject: [PATCH] Fix incorrect exception handling. Approved by: so Security: FreeBSD-EN-19:15.libunwind --- contrib/llvm/projects/libunwind/src/EHHeaderParser.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/llvm/projects/libunwind/src/EHHeaderParser.hpp b/contrib/llvm/projects/libunwind/src/EHHeaderParser.hpp index 6c3ccc86317..59ebfe3565b 100644 --- a/contrib/llvm/projects/libunwind/src/EHHeaderParser.hpp +++ b/contrib/llvm/projects/libunwind/src/EHHeaderParser.hpp @@ -68,7 +68,9 @@ void EHHeaderParser::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; } -- 2.45.0