| Issue |
172801
|
| Summary |
opt crashes in llvm/lib/IR/Value.cpp:70
|
| Labels |
crash,
llvm
|
| Assignees |
|
| Reporter |
Emilyaxe
|
When running opt on this following IR., opt crashes.
I am not sure whether this is a valid test case, and I am appreciate for any clarification.
llvm version 3186ca2
test.ll
```
define internal i8 @sfork() {
entry:
%call = call i8 @foo()
%fp.val = call i8 @fork()
%cmp = icmp eq i8 %call, %fp.val
br i1 %cmp, label %merge, label %catch
catch: ; preds = %entry
%spill = landingpad %exn
unreachable
merge: ; preds = %entry
%spill = landingpad %exn
unreachable
}
```
commads
./bin/opt test.ll -S
stacktrace
```
opt: llvm-project/llvm/lib/IR/Value.cpp:70: llvm::Value::Value(llvm::Type*, unsigned int): Assertion `(VTy->isFirstClassType() || VTy->isVoidTy()) && "Cannot create non-first-class values except for constants!"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0. Program arguments: ../llvm-dir/llvm-release/llvm-project/build/bin/opt test.ll -S
#0 0x0000555d8556659f llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (../llvm-dir/llvm-release/llvm-project/build/bin/opt+0x560559f)
#1 0x0000555d8556320c llvm::sys::RunSignalHandlers() (../llvm-dir/llvm-release/llvm-project/build/bin/opt+0x560220c)
#2 0x0000555d855633a7 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x00007f568c0d7420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#4 0x00007f568b72400b raise /build/glibc-LcI20x/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
#5 0x00007f568b703859 abort /build/glibc-LcI20x/glibc-2.31/stdlib/abort.c:81:7
#6 0x00007f568b703729 get_sysdep_segment_value /build/glibc-LcI20x/glibc-2.31/intl/loadmsgcat.c:509:8
#7 0x00007f568b703729 _nl_load_domain /build/glibc-LcI20x/glibc-2.31/intl/loadmsgcat.c:970:34
#8 0x00007f568b714fd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
#9 0x0000555d85362ef9 llvm::Value::Value(llvm::Type*, unsigned int) (../llvm-dir/llvm-release/llvm-project/build/bin/opt+0x5401ef9)
#10 0x0000555d85289a6a llvm::Instruction::Instruction(llvm::Type*, unsigned int, llvm::User::AllocInfo, llvm::InsertPosition) (../llvm-dir/llvm-release/llvm-project/build/bin/opt+0x5328a6a)
#11 0x0000555d85293379 llvm::LandingPadInst::Create(llvm::Type*, unsigned int, llvm::Twine const&, llvm::InsertPosition) (../llvm-dir/llvm-release/llvm-project/build/bin/opt+0x5332379)
#12 0x0000555d84f1a34d llvm::LLParser::parseLandingPad(llvm::Instruction*&, llvm::LLParser::PerFunctionState&) (../llvm-dir/llvm-release/llvm-project/build/bin/opt+0x4fb934d)
#13 0x0000555d84f3c2b5 llvm::LLParser::parseInstruction(llvm::Instruction*&, llvm::BasicBlock*, llvm::LLParser::PerFunctionState&) (../llvm-dir/llvm-release/llvm-project/build/bin/opt+0x4fdb2b5)
#14 0x0000555d84f3cc45 llvm::LLParser::parseBasicBlock(llvm::LLParser::PerFunctionState&) (../llvm-dir/llvm-release/llvm-project/build/bin/opt+0x4fdbc45)
#15 0x0000555d84f3d3d8 llvm::LLParser::parseFunctionBody(llvm::Function&, unsigned int, llvm::ArrayRef<unsigned int>) (../llvm-dir/llvm-release/llvm-project/build/bin/opt+0x4fdc3d8)
#16 0x0000555d84f3d626 llvm::LLParser::parseDefine() (../llvm-dir/llvm-release/llvm-project/build/bin/opt+0x4fdc626)
#17 0x0000555d84f3e0e8 llvm::LLParser::parseTopLevelEntities() (../llvm-dir/llvm-release/llvm-project/build/bin/opt+0x4fdd0e8)
#18 0x0000555d84f3e191 llvm::LLParser::Run(bool, llvm::function_ref<std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> (llvm::StringRef, llvm::StringRef)>) (../llvm-dir/llvm-release/llvm-project/build/bin/opt+0x4fdd191)
#19 0x0000555d84ee3839 parseAssemblyInto(llvm::MemoryBufferRef, llvm::Module*, llvm::ModuleSummaryIndex*, llvm::SMDiagnostic&, llvm::SlotMapping*, bool, llvm::function_ref<std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> (llvm::StringRef, llvm::StringRef)>, llvm::AsmParserContext*) Parser.cpp:0:0
#20 0x0000555d84ee3a05 llvm::parseAssembly(llvm::MemoryBufferRef, llvm::SMDiagnostic&, llvm::LLVMContext&, llvm::SlotMapping*, llvm::function_ref<std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> (llvm::StringRef, llvm::StringRef)>, llvm::AsmParserContext*) (../llvm-dir/llvm-release/llvm-project/build/bin/opt+0x4f82a05)
#21 0x0000555d84ede531 llvm::parseIR(llvm::MemoryBufferRef, llvm::SMDiagnostic&, llvm::LLVMContext&, llvm::ParserCallbacks, llvm::AsmParserContext*) (../llvm-dir/llvm-release/llvm-project/build/bin/opt+0x4f7d531)
#22 0x0000555d84ee0906 llvm::parseIRFile(llvm::StringRef, llvm::SMDiagnostic&, llvm::LLVMContext&, llvm::ParserCallbacks, llvm::AsmParserContext*) (../llvm-dir/llvm-release/llvm-project/build/bin/opt+0x4f7f906)
#23 0x0000555d807a2222 optMain (../llvm-dir/llvm-release/llvm-project/build/bin/opt+0x841222)
#24 0x00007f568b705083 __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/../csu/libc-start.c:342:3
#25 0x0000555d8079aeae _start (../llvm-dir/llvm-release/llvm-project/build/bin/opt+0x839eae)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs