Compiling of apply() function without arguments leads to cdt-cpp crash
jolly-fellow opened this issue · 0 comments
alex@work-vm:~/dev/projects/AntelopeIO/cdt/tools/external/eos-vm/tools$ cdt-cpp test_wasm.cpp
Warning, empty ricardian clause file
Warning, empty ricardian clause file
Stack dump:
0. Program arguments: /home/alex/dev/projects/AntelopeIO/cdt/build/bin/clang-9 -cc1 -triple wasm32 -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-name test_wasm.cpp -mrelocation-model static -mthread-model posix -masm-verbose -mconstructor-aliases -ffreestanding -fuse-init-array -target-cpu generic -fvisibility hidden -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -coverage-notes-file /tmp/antelope-836d9f..gcno -resource-dir /home/alex/dev/projects/AntelopeIO/cdt/build/lib/clang/9.0.1 -I . -D eosio_cdt -D eosio_cdt_major=3 -D eosio_cdt_minor=2 -D eosio_cdt_patchlevel=0 -D _GNU_SOURCE=1 -D BOOST_DISABLE_ASSERTS -D BOOST_EXCEPTION_DISABLE -U APPLE -I /home/alex/dev/projects/AntelopeIO/cdt/build/bin/../include/libcxx -I /home/alex/dev/projects/AntelopeIO/cdt/build/bin/../include/libc -I /home/alex/dev/projects/AntelopeIO/cdt/build/bin/../include -I /home/alex/dev/projects/AntelopeIO/cdt/build/bin/../include/eosiolib/core -I /home/alex/dev/projects/AntelopeIO/cdt/build/bin/../include/eosiolib/contracts -isysroot /home/alex/dev/projects/AntelopeIO/cdt/build/bin/../ -internal-isystem /home/alex/dev/projects/AntelopeIO/cdt/build/bin/..//include/c++/v1 -internal-isystem /home/alex/dev/projects/AntelopeIO/cdt/build/lib/clang/9.0.1/include -internal-isystem /home/alex/dev/projects/AntelopeIO/cdt/build/bin/..//include -O3 -std=gnu++2a -fdeprecated-macro -fdebug-compilation-dir /home/alex/dev/projects/AntelopeIO/cdt/tools/external/eos-vm/tools -ferror-limit 19 -fmessage-length 0 -fno-builtin -fno-rtti -fno-threadsafe-statics -fmodules-ts -fno-implicit-modules -fobjc-runtime=gnustep -fno-common -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -load /home/alex/dev/projects/AntelopeIO/cdt/build/bin/LLVMEosioApply.so -mllvm -use-cfl-aa-in-codegen=both -o /tmp/antelope-836d9f..o -x c++ test_wasm.cpp
- parser at end of file
- Per-module optimization passes
- Running pass 'Function Pass Manager' on module 'test_wasm.cpp'.
- Running pass 'Combine redundant instructions' on function '@apply'
/home/alex/dev/projects/AntelopeIO/cdt/build/bin/clang-9[0x1457864]
/home/alex/dev/projects/AntelopeIO/cdt/build/bin/clang-9(_ZN4llvm3sys17RunSignalHandlersEv+0xee)[0x14557ae]
/home/alex/dev/projects/AntelopeIO/cdt/build/bin/clang-9[0x1457c65]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f6496118520]
/home/alex/dev/projects/AntelopeIO/cdt/build/bin/clang-9[0x10e9c71]
/home/alex/dev/projects/AntelopeIO/cdt/build/bin/clang-9(_ZN4llvm24InstructionCombiningPass13runOnFunctionERNS_8FunctionE+0x317)[0x10ea857]
/home/alex/dev/projects/AntelopeIO/cdt/build/bin/clang-9(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x3e2)[0x1013592]
/home/alex/dev/projects/AntelopeIO/cdt/build/bin/clang-9(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x63)[0x1013853]
/home/alex/dev/projects/AntelopeIO/cdt/build/bin/clang-9(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x57b)[0x1013ebb]
/home/alex/dev/projects/AntelopeIO/cdt/build/bin/clang-9(_ZN5clang17EmitBackendOutputERNS_17DiagnosticsEngineERKNS_19HeaderSearchOptionsERKNS_14CodeGenOptionsERKNS_13TargetOptionsERKNS_11LangOptionsERKN4llvm10DataLayoutEPNSE_6ModuleENS_13BackendActionESt10unique_ptrINSE_17raw_pwrite_streamESt14default_deleteISM_EE+0x3392)[0x15d7b42]
/home/alex/dev/projects/AntelopeIO/cdt/build/bin/clang-9[0x1f373e3]
/home/alex/dev/projects/AntelopeIO/cdt/build/bin/clang-9(_ZN5clang8ParseASTERNS_4SemaEbb+0x273)[0x2739ed3]
/home/alex/dev/projects/AntelopeIO/cdt/build/bin/clang-9(_ZN5clang14FrontendAction7ExecuteEv+0x57)[0x1a60447]
/home/alex/dev/projects/AntelopeIO/cdt/build/bin/clang-9(_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE+0x6a0)[0x1a09730]
/home/alex/dev/projects/AntelopeIO/cdt/build/bin/clang-9(_ZN5clang25ExecuteCompilerInvocationEPNS_16CompilerInstanceE+0x6ad)[0x1aef39d]
/home/alex/dev/projects/AntelopeIO/cdt/build/bin/clang-9(_Z8cc1_mainN4llvm8ArrayRefIPKcEES2_Pv+0x897)[0x859657]
/home/alex/dev/projects/AntelopeIO/cdt/build/bin/clang-9(main+0x290a)[0x857aca]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7f64960ffd90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7f64960ffe40]
/home/alex/dev/projects/AntelopeIO/cdt/build/bin/clang-9(_start+0x2e)[0x854f0e]
clang-9: error: unable to execute command: Segmentation fault (core dumped)
clang-9: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 9.0.1 (https://github.com/AntelopeIO/cdt-clang 1baf03bbaa65a20b3de00fede1bc039666006c8c) (https://github.com/AntelopeIO/cdt-llvm 6a0991f5118ef11008c88c3f5e6ce2692642ffb8)
Target: wasm32
Thread model: posix
InstalledDir: /home/alex/dev/projects/AntelopeIO/cdt/build/bin
clang-9: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
clang-9: note: diagnostic msg:
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-9: note: diagnostic msg: /tmp/test_wasm-d6005e.cpp
clang-9: note: diagnostic msg: /tmp/test_wasm-d6005e.sh
clang-9: note: diagnostic msg:
test_wasm-d6005e.sh.gz
test_wasm-d6005e.cpp.gz
test_wasm.cpp.gz