[PATCH] D102304: [WIP][lld] Implement crash reproducer

Haowei Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 20 17:56:04 PDT 2021


haowei added a comment.

In D102304#2762298 <https://reviews.llvm.org/D102304#2762298>, @MaskRay wrote:

> I don't understand the purpose. Didn't we agree that implementing this on a different process is a correct approach?

Sorry for the confusion, I created this change so I can share the code with other people. It's not in a reviewable state and I mainly use it as a baseline for testing.

If I understood correctly, we agreed to implement a lld crash reproducer in a similar way like clang with "-fintegrated-cc1" as the first step, which relies on `CrashRecoveryContext` instead of relying on a second process. The crash reproducer can be further improved by implementing a reproducer that works on a different process if the first step is not good enough.

D102304 <https://reviews.llvm.org/D102304> added a `createCrashReproduceTar` to the lld elf driver, which generates a reproducer tarball without re-invoke the lldMain and will be used by `CrashRecoveryContext` in case lld recovered from a crash. The principle is to record the file names used by lld and use them to generate the reproducer in case lld crashes. I tried the other approach which makes the reproducer to determine the file needs to be included but it turns out very easy to miss some files and hard to maintain. So I just record the filenames, which also seems to be easier to be extended to other drivers. Please let me know your opinions on this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102304



More information about the llvm-commits mailing list