From 59155e79ccbd72a354e8aa0b0cb3fee657fc52d2 Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Tue, 11 Mar 2014 23:43:43 +0000 Subject: 0 is a valid LSDA encoding and can be seen in statically linked programs. Initialize lsdaEncoding to DW_EH_PE_omit and check for that value to decide whether a value should be decoded. llvm-svn: 203626 --- libcxxabi/src/Unwind/DwarfParser.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libcxxabi') diff --git a/libcxxabi/src/Unwind/DwarfParser.hpp b/libcxxabi/src/Unwind/DwarfParser.hpp index 152baab9e38..640e4f8aa9f 100644 --- a/libcxxabi/src/Unwind/DwarfParser.hpp +++ b/libcxxabi/src/Unwind/DwarfParser.hpp @@ -149,7 +149,7 @@ const char *CFI_Parser::decodeFDE(A &addressSpace, pint_t fdeStart, if (cieInfo->fdesHaveAugmentationData) { pint_t augLen = (pint_t)addressSpace.getULEB128(p, nextCFI); pint_t endOfAug = p + augLen; - if (cieInfo->lsdaEncoding != 0) { + if (cieInfo->lsdaEncoding != DW_EH_PE_omit) { // peek at value (without indirection). Zero means no lsda pint_t lsdaStart = p; if (addressSpace.getEncodedP(p, nextCFI, cieInfo->lsdaEncoding & 0x0F) != @@ -255,7 +255,7 @@ template const char *CFI_Parser::parseCIE(A &addressSpace, pint_t cie, CIE_Info *cieInfo) { cieInfo->pointerEncoding = 0; - cieInfo->lsdaEncoding = 0; + cieInfo->lsdaEncoding = DW_EH_PE_omit; cieInfo->personalityEncoding = 0; cieInfo->personalityOffsetInCIE = 0; cieInfo->personality = 0; -- cgit v1.2.3