[llvm-bugs] [Bug 46436] Clang crashes when compiling invalid LLVM IR file
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jun 24 06:51:38 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46436
Florian Hahn <florian_hahn at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |WONTFIX
Status|NEW |RESOLVED
CC| |aprantl at apple.com,
| |florian_hahn at apple.com
Summary|Internal clang error while |Clang crashes when
|compiling llvm code |compiling invalid LLVM IR
| |file
--- Comment #1 from Florian Hahn <florian_hahn at apple.com> ---
I think this works as expected. The IR is invalid and most LLVM tools use
report_fatal_error to abort on invalid IR. The relevant abort is here:
https://github.com/llvm/llvm-project/blob/07f335128410ca2dbb4b78050132ecd070e2e425/llvm/lib/IR/AutoUpgrade.cpp#L3867
I'll go ahead and mark as wont fix for now. If I am missing something, please
feel free to re-open.
Note that this should only be an issue with invalid IR files provided by a
user. Frontends, the middle-end and back-ends should should never produce
invalid IR.
Running with opt produces:
opt -verify t.ll
Aliasee should be either GlobalValue or ConstantExpr
i32 ()* @g.0
LLVM ERROR: Broken module found, compilation aborted!
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0. Program arguments: bin/opt -verify t.ll
0 opt 0x000000010764a6b5
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1 opt 0x0000000107649458 llvm::sys::RunSignalHandlers() +
248
2 opt 0x000000010764aca6 SignalHandler(int) + 262
3 libsystem_platform.dylib 0x00007fff722cc5fd _sigtramp + 29
4 libsystem_platform.dylib 000000000000000000 _sigtramp + 18446603338600626720
5 libsystem_c.dylib 0x00007fff721a2808 abort + 120
6 opt 0x00000001075a4efb
llvm::report_fatal_error(llvm::Twine const&, bool) + 427
7 opt 0x00000001075a4d4b llvm::report_fatal_error(char
const*, bool) + 43
8 opt 0x0000000106ddb1ff
llvm::UpgradeDebugInfo(llvm::Module&) + 207
9 opt 0x0000000106947f0b
llvm::LLParser::ValidateEndOfModule(bool) + 2523
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200624/253cba13/attachment.html>
More information about the llvm-bugs
mailing list