Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/lib/libunwind 0 is a valid LSDA encoding and can be seen...



details:   https://anonhg.NetBSD.org/src/rev/04c3a695e2cb
branches:  trunk
changeset: 794323:04c3a695e2cb
user:      joerg <joerg%NetBSD.org@localhost>
date:      Tue Mar 11 23:52:17 2014 +0000

description:
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.

diffstat:

 sys/lib/libunwind/DwarfParser.hpp |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r f49c5d762c2d -r 04c3a695e2cb sys/lib/libunwind/DwarfParser.hpp
--- a/sys/lib/libunwind/DwarfParser.hpp Tue Mar 11 23:23:44 2014 +0000
+++ b/sys/lib/libunwind/DwarfParser.hpp Tue Mar 11 23:52:17 2014 +0000
@@ -172,7 +172,7 @@
   if (cieInfo->fdesHaveAugmentationData) {
     uintptr_t augLen = 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,
@@ -198,7 +198,7 @@
 bool CFI_Parser<A, R>::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;



Home | Main Index | Thread Index | Old Index