Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flaky Behavior on Inline-Float.c #124

Open
JonathanDLTran opened this issue Apr 15, 2022 · 1 comment
Open

Flaky Behavior on Inline-Float.c #124

JonathanDLTran opened this issue Apr 15, 2022 · 1 comment

Comments

@JonathanDLTran
Copy link
Collaborator

JonathanDLTran commented Apr 15, 2022

When running inline-float.c, sometimes, the pass crashes on when converted egg terms back to llvm instructions.
The error message is:

Stopped after 4 iterations, reason: Some(Saturated)
Dropping inapplicable rules: div-1 div-1-inv neg-neg neg-neg-rev neg-sgn neg-sgn-rev neg-zero-inv neg-zero-inv-rev neg-minus neg-minus-rev neg-minus-zero neg-minus-zero-rev sqrt-1-inv sqrt-1-inv-rev neg_unop sqrt_unop /_binop
Stopped after 4 iterations, reason: Some(Saturated)
Dropping inapplicable rules: div-1 div-1-inv neg-neg neg-neg-rev neg-sgn neg-sgn-rev neg-zero-inv neg-zero-inv-rev neg-minus neg-minus-rev neg-minus-zero neg-minus-zero-rev sqrt-1-inv sqrt-1-inv-rev neg_unop sqrt_unop /_binop
Stopped after 4 iterations, reason: Some(Saturated)
Dropping inapplicable rules: div-1 div-1-inv neg-neg neg-neg-rev neg-sgn neg-sgn-rev neg-zero-inv neg-zero-inv-rev neg-minus neg-minus-rev neg-minus-zero neg-minus-zero-rev sqrt-1-inv sqrt-1-inv-rev neg_unop sqrt_unop /_binop
Stopped after 11 iterations, reason: Some(Saturated)
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /usr/local/opt/llvm/bin/clang -emit-llvm -S -Xclang -load -Xclang target/debug/libllvmlib.dylib -mllvm -opt -mllvm -print=false build/aa.ll -o build/diospyros.ll 
1.	Per-module optimization passes
2.	Running pass 'Print Module IR' on module 'build/aa.ll'.
0  libLLVM.dylib            0x00000001091ae6d4 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1  libLLVM.dylib            0x00000001091ae151 llvm::sys::CleanupOnSignal(unsigned long) + 184
2  libLLVM.dylib            0x000000010911ae21 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) + 97
3  libLLVM.dylib            0x000000010911af8a CrashRecoverySignalHandler(int) + 135
4  libsystem_platform.dylib 0x00007fff6a5fdb5d _sigtramp + 29
5  libLLVM.dylib            0x0000000109dd7eb1 llvm::TargetLibraryAnalysis::run(llvm::Function const&, llvm::AnalysisManager<llvm::Function>&) + 209
6  libLLVM.dylib            0x00000001091bde7b WriteAsOperandInternal(llvm::raw_ostream&, llvm::Value const*, (anonymous namespace)::TypePrinting*, llvm::SlotTracker*, llvm::Module const*) + 711
7  libLLVM.dylib            0x00000001091b6860 (anonymous namespace)::AssemblyWriter::printInstruction(llvm::Instruction const&) + 2030
8  libLLVM.dylib            0x00000001091b3423 (anonymous namespace)::AssemblyWriter::printBasicBlock(llvm::BasicBlock const*) + 625
9  libLLVM.dylib            0x00000001091b2e80 (anonymous namespace)::AssemblyWriter::printFunction(llvm::Function const*) + 2840
10 libLLVM.dylib            0x00000001091b4681 llvm::Module::print(llvm::raw_ostream&, llvm::AssemblyAnnotationWriter*, bool, bool) const + 4609
11 libLLVM.dylib            0x00000001092548f6 llvm::PrintModulePass::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) + 362
12 libLLVM.dylib            0x0000000109254e96 (anonymous namespace)::PrintModulePassWrapper::runOnModule(llvm::Module&) + 50
13 libLLVM.dylib            0x0000000109274dd4 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 668
14 libclang-cpp.dylib       0x0000000105ec5d66 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::__1::unique_ptr<llvm::raw_pwrite_stream, std::__1::default_delete<llvm::raw_pwrite_stream> >) + 10572
15 libclang-cpp.dylib       0x00000001060ebf0d clang::CodeGenAction::ExecuteAction() + 1737
16 libclang-cpp.dylib       0x00000001065ecf9b clang::FrontendAction::Execute() + 77
17 libclang-cpp.dylib       0x00000001065b4fc1 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1287
18 libclang-cpp.dylib       0x000000010663a7db clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1059
19 clang                    0x00000001054530b8 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 1880
20 clang                    0x00000001054519c6 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) + 270
21 libclang-cpp.dylib       0x00000001063b2301 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, bool*) const::$_1>(long) + 23
22 libLLVM.dylib            0x000000010911ad9c llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) + 218
23 libclang-cpp.dylib       0x00000001063b19bf clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, bool*) const + 233
24 libclang-cpp.dylib       0x0000000106392796 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const + 526
25 libclang-cpp.dylib       0x0000000106392985 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*> >&) const + 95
26 libclang-cpp.dylib       0x00000001063a15ca clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*> >&) + 210
27 clang                    0x0000000105451202 main + 7204
28 libdyld.dylib            0x00007fff6a4123d5 start + 1
29 libdyld.dylib            0x000000000000000e start + 18446603338733509690
clang-11: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 11.0.1
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin
clang-11: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs.
make: *** [run-opt] Error 254
@sampsyo
Copy link
Contributor

sampsyo commented Apr 15, 2022

Hmm; a crash in printInstruction looks suspicious! Probably indicates malformed IR… running the validation pass could help, as could attempting to narrow down the crashing instruction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants