[PATCH][cxxabi] correctly handle "omit" encoding
Patrick Wildt
mail at patrick-wildt.de
Fri Apr 11 05:14:39 PDT 2014
Hi,
getEncodedP() should properly handle the "omit" encoding and return zero.
\Patrick
>From 37c72b3bcb69c9d127011d6b0756f577d0c4166d Mon Sep 17 00:00:00 2001
From: Patrick Wildt <patrick at blueri.se>
Date: Fri, 11 Apr 2014 14:10:55 +0200
Subject: [PATCH] If the encoding is set to omit, it should be handled
properly.
---
src/Unwind/AddressSpace.hpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/Unwind/AddressSpace.hpp b/src/Unwind/AddressSpace.hpp
index aac8b7f..51bd3e9 100644
--- a/src/Unwind/AddressSpace.hpp
+++ b/src/Unwind/AddressSpace.hpp
@@ -167,6 +167,9 @@ inline LocalAddressSpace::pint_t LocalAddressSpace::getEncodedP(pint_t &addr,
const uint8_t *p = (uint8_t *)addr;
pint_t result;
+ if (encoding == DW_EH_PE_omit)
+ return 0;
+
// first get value
switch (encoding & 0x0F) {
case DW_EH_PE_ptr:
--
1.8.5.2 (Apple Git-48)
More information about the cfe-commits
mailing list