bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/23321] New: Gold Linker SIGSEGV During DWARF Decoding, because


From: twoh at fb dot com
Subject: [Bug gold/23321] New: Gold Linker SIGSEGV During DWARF Decoding, because it doesn't support DW_LNS_set_epilogue_begin/end and DW_LNS_set_isa
Date: Wed, 20 Jun 2018 18:05:52 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=23321

            Bug ID: 23321
           Summary: Gold Linker SIGSEGV During DWARF Decoding, because it
                    doesn't support DW_LNS_set_epilogue_begin/end and
                    DW_LNS_set_isa
           Product: binutils
           Version: 2.30
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gold
          Assignee: ccoutant at gmail dot com
          Reporter: twoh at fb dot com
                CC: ian at airs dot com
  Target Milestone: ---

As written in the summary, gold linker crashes with SIGSEGV because dwarf
reader doesn't support some opcodes. Below is my temporary patch for 2.26.1 and
2.29.1, and I confirmed that the issue is not addressed in 2.30 as well. 

It would be nice if someone has a better understanding about the codebase can
take a look. Thanks!

---

===================================================================
--- 2.26.1/src/binutils-2.26.1/gold/dwarf_reader.cc
+++ 2.26.1/src/binutils-2.26.1/gold/dwarf_reader.cc
@@ -1917,6 +1917,20 @@
       }
       break;

+    case elfcpp::DW_LNS_set_epilogue_begin:
+    case elfcpp::DW_LNS_set_prologue_end:
+      // Do nothing.
+      break;
+
+    case elfcpp::DW_LNS_set_isa:
+      {
+        size_t templen;
+        read_unsigned_LEB_128(start, &templen);
+        oplen += templen;
+      }
+      break;
+
     default:
       {
         // Ignore unknown opcode  silently
Index: 2.29.1/src/binutils-2.29.1/gold/dwarf_reader.cc
===================================================================
--- 2.29.1/src/binutils-2.29.1/gold/dwarf_reader.cc
+++ 2.29.1/src/binutils-2.29.1/gold/dwarf_reader.cc
@@ -1917,6 +1917,20 @@
       }
       break;

+    case elfcpp::DW_LNS_set_epilogue_begin:
+    case elfcpp::DW_LNS_set_prologue_end:
+      // Do nothing.
+      break;
+
+    case elfcpp::DW_LNS_set_isa:
+      {
+        size_t templen;
+        read_unsigned_LEB_128(start, &templen);
+        oplen += templen;
+      }
+      break;
+
     default:
       {
         // Ignore unknown opcode  silently

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]