Open
Description
The crash is caused when using -ffat-lto-objects
together with -fsanitize=hwaddress
.
$ cat test.c
int main(int argc, char* argv[])
{ (void)argv; return argc-1;}
$ clang -c test.c -fsanitize=hwaddress -flto=thin
// no crash
$ clang -c test.c -fsanitize=hwaddress -flto=thin -ffat-lto-objects
clang: /usr/local/google/work/llvm-monorepo/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:897: void clang::BackendConsumer::DiagnosticHandlerImpl(const DiagnosticInfo &): Assertion `CurLinkModule && "CurLinkM
odule must be set for linker diagnostics"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: ../release/bin/clang -c test.c -fsanitize=hwaddress -flto=thin -ffat-lto-objects
1. <eof> parser at end of file
2. Optimizer 3. Running pass "hwasan<>" on module "test.c"