[PATCH] D44685: [AMDGPU] Improve disassembler error handling

Artem Tamazov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 20 10:19:22 PDT 2018


artem.tamazov added inline comments.


================
Comment at: tools/llvm-objdump/llvm-objdump.cpp:611
+      OS << format("\t.long 0x%08" PRIx32 " ",
+                   static_cast<uint32_t>(*reinterpret_cast<const U32*>(Bytes.data())));
+      OS.indent(42);
----------------
What if there are less than 4 bytes left? Let's make sure that we are not getting into undefined behavior in such a case.


Repository:
  rL LLVM

https://reviews.llvm.org/D44685





More information about the llvm-commits mailing list