[PATCH] D99375: [PowerPC] Add ROP Protection Instructions for PowerPC

Mitch Phillips via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 9 12:13:15 PDT 2021


hctim added a comment.

Looks like this patch broke the UBSan buildbot (https://lab.llvm.org/buildbot/#/builders/5/builds/6546), PTAL.

Repro instructions here <https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild>, copied the UBSan report below for your reference:

  FAIL: LLVM :: MC/Disassembler/PowerPC/ppc64-encoding-ISA31.txt (54419 of 75431)
  ******************** TEST 'LLVM :: MC/Disassembler/PowerPC/ppc64-encoding-ISA31.txt' FAILED ********************
  Script:
  --
  : 'RUN: at line 1';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_ubsan/bin/llvm-mc --disassemble /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/MC/Disassembler/PowerPC/ppc64-encoding-ISA31.txt -triple powerpc64-unknown-linux-gnu    -mcpu=pwr10 | /b/sanitizer-x86_64-linux-fast/build/llvm_build_ubsan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/MC/Disassembler/PowerPC/ppc64-encoding-ISA31.txt
  --
  Exit Code: 1
  Command Output (stderr):
  --
  /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp:290:60: runtime error: left shift of negative value -1
      #0 0x133a4a8 in decodeMemRIHashOperands /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp:290:60
      #1 0x133a4a8 in llvm::MCDisassembler::DecodeStatus llvm::decodeToMCInst<unsigned long>(llvm::MCDisassembler::DecodeStatus, unsigned int, unsigned long, llvm::MCInst&, unsigned long, void const*, bool&) /b/sanitizer-x86_64-linux-fast/build/llvm_build_ubsan/lib/Target/PowerPC/PPCGenDisassemblerTables.inc:6657:9
      #2 0x1337b3e in llvm::MCDisassembler::DecodeStatus llvm::decodeInstruction<unsigned long>(unsigned char const*, llvm::MCInst&, unsigned long, unsigned long, void const*, llvm::MCSubtargetInfo const&) /b/sanitizer-x86_64-linux-fast/build/llvm_build_ubsan/lib/Target/PowerPC/PPCGenDisassemblerTables.inc:8119:11
      #3 0xfc69a9 in PrintInsts /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llvm-mc/Disassembler.cpp:49:16
      #4 0xfc69a9 in llvm::Disassembler::disassemble(llvm::Target const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, llvm::MCSubtargetInfo&, llvm::MCStreamer&, llvm::MemoryBuffer&, llvm::SourceMgr&, llvm::MCContext&, llvm::raw_ostream&, llvm::MCTargetOptions const&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llvm-mc/Disassembler.cpp:196:24
      #5 0xfb7b68 in main /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llvm-mc/llvm-mc.cpp:559:11
      #6 0x7ff4a60a409a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
      #7 0xf9c949 in _start (/b/sanitizer-x86_64-linux-fast/build/llvm_build_ubsan/bin/llvm-mc+0xf9c949)
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp:290:60 in 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99375/new/

https://reviews.llvm.org/D99375



More information about the llvm-commits mailing list