[PATCH] D79229: [llvm-objcopy] -O binary: skip empty sections

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 3 20:09:16 PDT 2020


vitalybuka reopened this revision.
vitalybuka added a comment.
This revision is now accepted and ready to land.

http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/41020/steps/check-llvm%20ubsan/logs/stdio

  --
  /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llvm-objcopy/ELF/Object.cpp:147:51: runtime error: addition of unsigned offset to 0x7f7a7b973000 overflowed to 0x7f7a7b972000
      #0 0x48e24c in llvm::objcopy::elf::SectionWriter::visit(llvm::objcopy::elf::Section const&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llvm-objcopy/ELF/Object.cpp:147:51
      #1 0x495b37 in llvm::objcopy::elf::BinaryWriter::write() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llvm-objcopy/ELF/Object.cpp:2214:9
      #2 0x459738 in llvm::objcopy::elf::writeOutput(llvm::objcopy::CopyConfig const&, llvm::objcopy::elf::Object&, llvm::objcopy::Buffer&, llvm::objcopy::elf::ElfType) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp:757:18
      #3 0x459d09 in llvm::objcopy::elf::executeObjcopyOnBinary(llvm::objcopy::CopyConfig const&, llvm::object::ELFObjectFileBase&, llvm::objcopy::Buffer&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp:819:17
      #4 0x43f1cb in executeObjcopyOnBinary(llvm::objcopy::CopyConfig&, llvm::object::Binary&, llvm::objcopy::Buffer&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llvm-objcopy/llvm-objcopy.cpp:173:12
      #5 0x43cd75 in executeObjcopy /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llvm-objcopy/llvm-objcopy.cpp:301:21
      #6 0x43cd75 in main /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llvm-objcopy/llvm-objcopy.cpp:374:19
      #7 0x7f7a7b26109a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
      #8 0x40ab79 in _start (/b/sanitizer-x86_64-linux-fast/build/llvm_build_ubsan/bin/llvm-objcopy+0x40ab79)
  
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llvm-objcopy/ELF/Object.cpp:147:51 in 
  
  --
  
  ********************
  Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
  ********************
  Failing Tests (1):
    LLVM :: tools/llvm-objcopy/ELF/binary-paddr.test


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79229





More information about the llvm-commits mailing list