https://bugs.llvm.org/show_bug.cgi?id=51564

            Bug ID: 51564
           Summary: IRMover warning "Linking two modules of different
                    target triples" crashes clang
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: l...@inglorion.net
                CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
                    neeil...@live.com, richard-l...@metafoo.co.uk

See https://bugs.chromium.org/p/chromium/issues/detail?id=1128437

This is a ThinLTO build, where clang is invoked with -fthinlto-index to
generate machine code.

IRMover.cpp contains code to check that when linking two IR modules together,
their target triples are compatible. In this case they are not, so a warning
diagnostic is generated.

The diagnostic is handled by BackendConsumer::DiagnosticHandlerImpl in
clang/lib/CodeGen/CodeGenAction.cpp. This contains an assert that CurLinkModule
is set. When LLVM is built with asserts enabled, this assert will crash the
compiler, even if the diagnostic never results in a message to the user.
Immediately after that assert, the diagnostic is in fact ignored, so we're
crashing the compiler for a diagnostic that we never surface.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to