[PATCH] D47799: [COFF] add /errorrepro to save reproducer on error

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 6 11:29:13 PDT 2018


pcc added a comment.

If the test failure is related to LTO, would this really help? As I understand it, the failures are on the object files created by LTO, which I don't think would appear in the linkrepro file.

I wrote a small patch:

  diff --git a/lld/COFF/Chunks.cpp b/lld/COFF/Chunks.cpp
  index 6d8a0c7c1f4..2931bc23d21 100644
  --- a/lld/COFF/Chunks.cpp
  +++ b/lld/COFF/Chunks.cpp
  @@ -97,9 +97,11 @@ void SectionChunk::applyRelX64(uint8_t *Off, uint16_t Type, OutputSection *OS,
     case IMAGE_REL_AMD64_REL32_5:  add32(Off, S - P - 9); break;
     case IMAGE_REL_AMD64_SECTION:  applySecIdx(Off, OS); break;
     case IMAGE_REL_AMD64_SECREL:   applySecRel(this, Off, OS, S); break;
  -  default:
  +  default: {
  +    llvm::outs() << toHex(File->MB.getBuffer()) << '\n';
       fatal("unsupported relocation type 0x" + Twine::utohexstr(Type));
     }
  +  }
   }
  
   void SectionChunk::applyRelX86(uint8_t *Off, uint16_t Type, OutputSection *OS,

and used it to build chromium in a loop on my machine overnight. With that I was able to reproduce the problem and capture one of the object files. I'll take a look at it.


https://reviews.llvm.org/D47799





More information about the llvm-commits mailing list