You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm facing an issue with compiling some code with SymCC. When a code tries to decrease a boolean variable, an error comes. This does not occur when I compile with pure clang. Please take a look at the example source code and error messages below. The code would not be used often in practice, but it is generated by a mutataion analysis tool.
Another error happens when I compile a C++ project. Compiling with Clang has no problem, but with SymCC, it has a compile error. I used regular standard library as below:
export SYMCC_REGULAR_LIBCXX=yes
export CC=/opt/symcc/bin/symcc
export CXX=/opt/symcc/bin/sym++
cmake -DLIBS=/opt/lib .
make
But It has no specific error message, and I cannot share the code, unfortunately. The project code does not contain the above issue code, but it shows...the following error message:
Warning: unknown instruction %51 = insertelement <4 x double> undef, double %50, i32 0; the result will be concretized
Warning: unknown instruction %56 = insertelement <4 x double> %51, double %55, i32 1; the result will be concretized
Warning: unknown instruction %61 = insertelement <4 x double> %56, double %60, i32 2; the result will be concretized
Warning: unknown instruction %66 = insertelement <4 x double> %61, double %65, i32 3; the result will be concretized
Warning: unknown instruction %69 = insertelement <8 x i32> undef, i32 %68, i32 0; the result will be concretized
Warning: unknown instruction %73 = insertelement <8 x i32> %69, i32 %72, i32 1; the result will be concretized
Warning: unknown instruction %77 = insertelement <8 x i32> %73, i32 %76, i32 2; the result will be concretized
Warning: unknown instruction %81 = insertelement <8 x i32> %77, i32 %80, i32 3; the result will be concretized
Warning: unknown instruction %85 = insertelement <8 x i32> %81, i32 %84, i32 4; the result will be concretized
Warning: unknown instruction %89 = insertelement <8 x i32> %85, i32 %88, i32 5; the result will be concretized
Warning: unknown instruction %93 = insertelement <8 x i32> %89, i32 %92, i32 6; the result will be concretized
Warning: unknown instruction %97 = insertelement <8 x i32> %93, i32 %96, i32 7; the result will be concretized
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: /usr/lib/llvm-14/bin/clang++ -fpass-plugin=/opt/symcc/bin/libSymbolize.so ... -mavx2 -mfma -fopenmp=libomp -std=c++14 ... -o CMakeFiles/source.o -c source.cpp -L/opt/symcc/bin/SymRuntime-prefix/src/SymRuntime-build -lSymRuntime -Wl,-rpath,/opt/symcc/bin/SymRuntime-prefix/src/SymRuntime-build -Qunused-arguments
1. <eof> parser at end of file
2. Optimizer
#0 0x00007f99a5c70d01 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/lib/x86_64-linux-gnu/libLLVM-14.so.1+0xe3fd01)
#1 0x00007f99a5c6ea3e llvm::sys::RunSignalHandlers() (/lib/x86_64-linux-gnu/libLLVM-14.so.1+0xe3da3e)
#2 0x00007f99a5c700ab llvm::sys::CleanupOnSignal(unsigned long) (/lib/x86_64-linux-gnu/libLLVM-14.so.1+0xe3f0ab)
#3 0x00007f99a5b9cdff (/lib/x86_64-linux-gnu/libLLVM-14.so.1+0xd6bdff)
#4 0x00007f99a4915520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#5 0x00007f99a5e00b2b llvm::Value::setNameImpl(llvm::Twine const&) (/lib/x86_64-linux-gnu/libLLVM-14.so.1+0xfcfb2b)
#6 0x00007f99a5e00f29 llvm::Value::setName(llvm::Twine const&) (/lib/x86_64-linux-gnu/libLLVM-14.so.1+0xfcff29)
#7 0x00007f99a24e2f79 llvm::ExtractValueInst* llvm::IRBuilderBase::Insert<llvm::ExtractValueInst>(llvm::ExtractValueInst*, llvm::Twine const&) const /usr/include/llvm-14/llvm/IR/IRBuilder.h:149:5
#8 0x00007f99a24e2f79 llvm::IRBuilderBase::CreateExtractValue(llvm::Value*, llvm::ArrayRef<unsigned int>, llvm::Twine const&) /usr/include/llvm-14/llvm/IR/IRBuilder.h:2372:18
#9 0x00007f99a24d66a2 Symbolizer::createValueExpression(llvm::Value*, llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&) /opt/symcc/src/compiler/Symbolizer.cpp:1030:52
#10 0x00007f99a24d789e Symbolizer::shortCircuitExpressionUses() /opt/symcc/src/compiler/Symbolizer.cpp:147:32
#11 0x00007f99a24e61e4 (anonymous namespace)::instrumentFunction(llvm::Function&) /opt/symcc/src/compiler/Pass.cpp:190:39
#12 0x00007f99a24e6651 llvm::SmallPtrSet<void*, 2u>::SmallPtrSet() /usr/include/llvm-14/llvm/ADT/SmallPtrSet.h:464:25
#13 0x00007f99a24e6651 llvm::PreservedAnalyses::PreservedAnalyses() /usr/include/llvm-14/llvm/IR/PassManager.h:152:7
#14 0x00007f99a24e6651 llvm::PreservedAnalyses::none() /usr/include/llvm-14/llvm/IR/PassManager.h:155:62
#15 0x00007f99a24e6651 SymbolizePass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /opt/symcc/src/compiler/Pass.cpp:223:57
#16 0x00007f99a24e9b36 llvm::detail::PassModel<llvm::Function, SymbolizePass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /usr/include/llvm-14/llvm/IR/PassManagerInternal.h:89:3
#17 0x00007f99a5ddfa0e llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/lib/x86_64-linux-gnu/libLLVM-14.so.1+0xfaea0e)
#18 0x00007f99a79ca24d (/lib/x86_64-linux-gnu/libLLVM-14.so.1+0x2b9924d)
#19 0x00007f99a5de39d1 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/lib/x86_64-linux-gnu/libLLVM-14.so.1+0xfb29d1)
#20 0x00007f99a79ca07d (/lib/x86_64-linux-gnu/libLLVM-14.so.1+0x2b9907d)
#21 0x00007f99a5dde60e llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/lib/x86_64-linux-gnu/libLLVM-14.so.1+0xfad60e)
#22 0x00007f99acf65b9b (/lib/x86_64-linux-gnu/libclang-cpp.so.14+0x1862b9b)
#23 0x00007f99acf59a52 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/lib/x86_64-linux-gnu/libclang-cpp.so.14+0x1856a52)
#24 0x00007f99ad27f855 (/lib/x86_64-linux-gnu/libclang-cpp.so.14+0x1b7c855)
#25 0x00007f99ac107824 clang::ParseAST(clang::Sema&, bool, bool) (/lib/x86_64-linux-gnu/libclang-cpp.so.14+0xa04824)
#26 0x00007f99ad27bb71 clang::CodeGenAction::ExecuteAction() (/lib/x86_64-linux-gnu/libclang-cpp.so.14+0x1b78b71)
#27 0x00007f99adc17b57 clang::FrontendAction::Execute() (/lib/x86_64-linux-gnu/libclang-cpp.so.14+0x2514b57)
#28 0x00007f99adb6f3a6 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/lib/x86_64-linux-gnu/libclang-cpp.so.14+0x246c3a6)
#29 0x00007f99adc9145b clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/lib/x86_64-linux-gnu/libclang-cpp.so.14+0x258e45b)
#30 0x000000000041328b cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/lib/llvm-14/bin/clang+++0x41328b)
#31 0x00000000004114bc (/usr/lib/llvm-14/bin/clang+++0x4114bc)
#32 0x00007f99ad7eded2 (/lib/x86_64-linux-gnu/libclang-cpp.so.14+0x20eaed2)
#33 0x00007f99a5b9cb6d llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/lib/x86_64-linux-gnu/libLLVM-14.so.1+0xd6bb6d)
#34 0x00007f99ad7ed9c0 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const (/lib/x86_64-linux-gnu/libclang-cpp.so.14+0x20ea9c0)
#35 0x00007f99ad7b8183 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/lib/x86_64-linux-gnu/libclang-cpp.so.14+0x20b5183)
#36 0x00007f99ad7b840a clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/lib/x86_64-linux-gnu/libclang-cpp.so.14+0x20b540a)
#37 0x00007f99ad7d2507 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/lib/x86_64-linux-gnu/libclang-cpp.so.14+0x20cf507)
#38 0x0000000000410f26 main (/usr/lib/llvm-14/bin/clang+++0x410f26)
#39 0x00007f99a48fcd90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#40 0x00007f99a48fce40 call_init ./csu/../csu/libc-start.c:128:20
#41 0x00007f99a48fce40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#42 0x000000000040e3b5 _start (/usr/lib/llvm-14/bin/clang+++0x40e3b5)
clang: error: clang frontend command failed with exit code 139 (use -v to see invocation)
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-14/bin
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/UtilityFunctions-5d4db6.cpp
clang: note: diagnostic msg: /tmp/UtilityFunctions-5d4db6.sh
clang: note: diagnostic msg:
********************
make[3]: *** [CMakeFiles/build.make:244: CMakeFiles/source.cpp.o] Error 139
make[2]: *** [CMakeFiles/Makefile2:295: CMakeFiles/all] Error 2
The text was updated successfully, but these errors were encountered:
The crash on your C example is probably caused by SymCC not expecting arithmetic on Booleans. In handwritten code you can do something like !var, but I see that this is difficult with auto-generated code. We should probably add support for arithmetic on Booleans - would you like to give it a try?
The C++ problem looks as if the code was using vector types (e.g., for SIMD instructions), either directly or as a consequence of optimization. These aren't supported in SymCC unfortunately.
Hi,
C project with decreasing boolean variables
I'm facing an issue with compiling some code with SymCC. When a code tries to decrease a boolean variable, an error comes. This does not occur when I compile with pure clang. Please take a look at the example source code and error messages below. The code would not be used often in practice, but it is generated by a mutataion analysis tool.
Example code:
Error message:
C++ project
Another error happens when I compile a C++ project. Compiling with Clang has no problem, but with SymCC, it has a compile error. I used regular standard library as below:
But It has no specific error message, and I cannot share the code, unfortunately. The project code does not contain the above issue code, but it shows...the following error message:
The text was updated successfully, but these errors were encountered: