<div dir="ltr">Thanks - sorry for the noise. I've committed an attempted fix in r374196 & will keep an eye on the buildbot.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 9, 2019 at 11:15 AM Vitaly Buka <<a href="mailto:vitalybuka@google.com">vitalybuka@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>UBSAN error after the patch</div><div><pre style="font-family:"Courier New",courier,monotype,monospace;color:rgb(0,0,0);font-size:medium"><span>/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp:146:15: runtime error: load of value 71, which is not a valid value for type 'llvm::dwarf::LoclistEntries'
<br></span></pre></div><a href="http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-ubsan/builds/15298/steps/check-llvm%20ubsan/logs/stdio" target="_blank">http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-ubsan/builds/15298/steps/check-llvm%20ubsan/logs/stdio</a><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 8, 2019 at 2:46 PM David Blaikie via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Author: dblaikie<br>
Date: Tue Oct  8 14:48:46 2019<br>
New Revision: 374122<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=374122&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=374122&view=rev</a><br>
Log:<br>
DebugInfo: Move LLE enum handling to .def to match RLE handling<br>
<br>
Modified:<br>
    llvm/trunk/include/llvm/BinaryFormat/Dwarf.def<br>
    llvm/trunk/include/llvm/BinaryFormat/Dwarf.h<br>
    llvm/trunk/lib/BinaryFormat/Dwarf.cpp<br>
    llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp<br>
<br>
Modified: llvm/trunk/include/llvm/BinaryFormat/Dwarf.def<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/BinaryFormat/Dwarf.def?rev=374122&r1=374121&r2=374122&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/BinaryFormat/Dwarf.def?rev=374122&r1=374121&r2=374122&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/BinaryFormat/Dwarf.def (original)<br>
+++ llvm/trunk/include/llvm/BinaryFormat/Dwarf.def Tue Oct  8 14:48:46 2019<br>
@@ -17,7 +17,7 @@<br>
     defined HANDLE_DW_VIRTUALITY || defined HANDLE_DW_DEFAULTED ||             \<br>
     defined HANDLE_DW_CC || defined HANDLE_DW_LNS || defined HANDLE_DW_LNE ||  \<br>
     defined HANDLE_DW_LNCT || defined HANDLE_DW_MACRO ||                       \<br>
-    defined HANDLE_DW_RLE ||                                                   \<br>
+    defined HANDLE_DW_RLE || defined HANDLE_DW_LLE ||                          \<br>
     (defined HANDLE_DW_CFA && defined HANDLE_DW_CFA_PRED) ||                   \<br>
     defined HANDLE_DW_APPLE_PROPERTY || defined HANDLE_DW_UT ||                \<br>
     defined HANDLE_DWARF_SECTION || defined HANDLE_DW_IDX ||                   \<br>
@@ -91,6 +91,10 @@<br>
 #define HANDLE_DW_RLE(ID, NAME)<br>
 #endif<br>
<br>
+#ifndef HANDLE_DW_LLE<br>
+#define HANDLE_DW_LLE(ID, NAME)<br>
+#endif<br>
+<br>
 #ifndef HANDLE_DW_CFA<br>
 #define HANDLE_DW_CFA(ID, NAME)<br>
 #endif<br>
@@ -825,6 +829,17 @@ HANDLE_DW_RLE(0x05, base_address)<br>
 HANDLE_DW_RLE(0x06, start_end)<br>
 HANDLE_DW_RLE(0x07, start_length)<br>
<br>
+// DWARF v5 Loc List Entry encoding values.<br>
+HANDLE_DW_LLE(0x00, end_of_list)<br>
+HANDLE_DW_LLE(0x01, base_addressx)<br>
+HANDLE_DW_LLE(0x02, startx_endx)<br>
+HANDLE_DW_LLE(0x03, startx_length)<br>
+HANDLE_DW_LLE(0x04, offset_pair)<br>
+HANDLE_DW_LLE(0x05, default_location)<br>
+HANDLE_DW_LLE(0x06, base_address)<br>
+HANDLE_DW_LLE(0x07, start_end)<br>
+HANDLE_DW_LLE(0x08, start_length)<br>
+<br>
 // Call frame instruction encodings.<br>
 HANDLE_DW_CFA(0x00, nop)<br>
 HANDLE_DW_CFA(0x40, advance_loc)<br>
@@ -939,6 +954,7 @@ HANDLE_DW_IDX(0x05, type_hash)<br>
 #undef HANDLE_DW_LNCT<br>
 #undef HANDLE_DW_MACRO<br>
 #undef HANDLE_DW_RLE<br>
+#undef HANDLE_DW_LLE<br>
 #undef HANDLE_DW_CFA<br>
 #undef HANDLE_DW_CFA_PRED<br>
 #undef HANDLE_DW_APPLE_PROPERTY<br>
<br>
Modified: llvm/trunk/include/llvm/BinaryFormat/Dwarf.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/BinaryFormat/Dwarf.h?rev=374122&r1=374121&r2=374122&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/BinaryFormat/Dwarf.h?rev=374122&r1=374121&r2=374122&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/BinaryFormat/Dwarf.h (original)<br>
+++ llvm/trunk/include/llvm/BinaryFormat/Dwarf.h Tue Oct  8 14:48:46 2019<br>
@@ -308,11 +308,17 @@ enum MacroEntryType {<br>
 };<br>
<br>
 /// DWARF v5 range list entry encoding values.<br>
-enum RangeListEntries {<br>
+enum RnglistEntries {<br>
 #define HANDLE_DW_RLE(ID, NAME) DW_RLE_##NAME = ID,<br>
 #include "llvm/BinaryFormat/Dwarf.def"<br>
 };<br>
<br>
+/// DWARF v5 loc list entry encoding values.<br>
+enum LoclistEntries {<br>
+#define HANDLE_DW_LLE(ID, NAME) DW_LLE_##NAME = ID,<br>
+#include "llvm/BinaryFormat/Dwarf.def"<br>
+};<br>
+<br>
 /// Call frame instruction encodings.<br>
 enum CallFrameInfo {<br>
 #define HANDLE_DW_CFA(ID, NAME) DW_CFA_##NAME = ID,<br>
@@ -348,19 +354,6 @@ enum Constants {<br>
   DW_EH_PE_indirect = 0x80<br>
 };<br>
<br>
-/// Constants for location lists in DWARF v5.<br>
-enum LocationListEntry : unsigned char {<br>
-  DW_LLE_end_of_list = 0x00,<br>
-  DW_LLE_base_addressx = 0x01,<br>
-  DW_LLE_startx_endx = 0x02,<br>
-  DW_LLE_startx_length = 0x03,<br>
-  DW_LLE_offset_pair = 0x04,<br>
-  DW_LLE_default_location = 0x05,<br>
-  DW_LLE_base_address = 0x06,<br>
-  DW_LLE_start_end = 0x07,<br>
-  DW_LLE_start_length = 0x08<br>
-};<br>
-<br>
 /// Constants for the DW_APPLE_PROPERTY_attributes attribute.<br>
 /// Keep this list in sync with clang's DeclSpec.h ObjCPropertyAttributeKind!<br>
 enum ApplePropertyAttributes {<br>
@@ -475,6 +468,7 @@ StringRef LNStandardString(unsigned Stan<br>
 StringRef LNExtendedString(unsigned Encoding);<br>
 StringRef MacinfoString(unsigned Encoding);<br>
 StringRef RangeListEncodingString(unsigned Encoding);<br>
+StringRef LocListEncodingString(unsigned Encoding);<br>
 StringRef CallFrameString(unsigned Encoding, Triple::ArchType Arch);<br>
 StringRef ApplePropertyString(unsigned);<br>
 StringRef UnitTypeString(unsigned);<br>
<br>
Modified: llvm/trunk/lib/BinaryFormat/Dwarf.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/BinaryFormat/Dwarf.cpp?rev=374122&r1=374121&r2=374122&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/BinaryFormat/Dwarf.cpp?rev=374122&r1=374121&r2=374122&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/BinaryFormat/Dwarf.cpp (original)<br>
+++ llvm/trunk/lib/BinaryFormat/Dwarf.cpp Tue Oct  8 14:48:46 2019<br>
@@ -472,6 +472,17 @@ StringRef llvm::dwarf::RangeListEncoding<br>
   }<br>
 }<br>
<br>
+StringRef llvm::dwarf::LocListEncodingString(unsigned Encoding) {<br>
+  switch (Encoding) {<br>
+  default:<br>
+    return StringRef();<br>
+#define HANDLE_DW_LLE(ID, NAME)                                                \<br>
+  case DW_LLE_##NAME:                                                          \<br>
+    return "DW_LLE_" #NAME;<br>
+#include "llvm/BinaryFormat/Dwarf.def"<br>
+  }<br>
+}<br>
+<br>
 StringRef llvm::dwarf::CallFrameString(unsigned Encoding,<br>
     Triple::ArchType Arch) {<br>
   assert(Arch != llvm::Triple::ArchType::UnknownArch);<br>
<br>
Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp?rev=374122&r1=374121&r2=374122&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp?rev=374122&r1=374121&r2=374122&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp (original)<br>
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp Tue Oct  8 14:48:46 2019<br>
@@ -143,7 +143,7 @@ DWARFDebugLoclists::parseOneLocationList<br>
   DataExtractor::Cursor C(*Offset);<br>
<br>
   // dwarf::DW_LLE_end_of_list_entry is 0 and indicates the end of the list.<br>
-  while (auto Kind = static_cast<dwarf::LocationListEntry>(Data.getU8(C))) {<br>
+  while (auto Kind = static_cast<dwarf::LoclistEntries>(Data.getU8(C))) {<br>
     Entry E;<br>
     E.Kind = Kind;<br>
     switch (Kind) {<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>
</blockquote></div>