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
Trying to compile without optimizations, I get the following error:
$ ~/src/Tapir-Meta/tapir/build/bin/clang -fcilkplus -c test.c
Found return instr that returns non-void in Function of void return type!
ret i32 %76
void
The error gets uglier after enabling optimizations:
$ ~/src/Tapir-Meta/tapir/build/bin/clang -O1 -fcilkplus -c test.c
Found return instr that returns non-void in Function of void return type!
ret i32 %37
voidtest.c:3:5: warning: Tapir loop not transformed: failed to use divide-and-conquer loop spawning
[-Wpass-failed=loop-spawning]
int is_sorted(int *tab, int n) {
^
#0 0x0000559e79e0301a llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x12a301a)
#1 0x0000559e79e00dde llvm::sys::RunSignalHandlers() (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x12a0dde)
#2 0x0000559e79e00f36 SignalHandler(int) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x12a0f36)
#3 0x00007f2bb2214d00 __restore_rt (/usr/lib/libpthread.so.0+0x13d00)
#4 0x0000559e79d6514c simplifyFunctionCFG(llvm::Function&, llvm::TargetTransformInfo const&, llvm::AssumptionCache*, int, bool) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x120514c)
#5 0x0000559e79965e50 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0xe05e50)
#6 0x0000559e79965ea1 llvm::FPPassManager::runOnModule(llvm::Module&) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0xe05ea1)
#7 0x0000559e79965576 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0xe05576)
#8 0x0000559e79fe665d (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x148665d)
#9 0x0000559e79fe896b clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x148896b)
#10 0x0000559e7a8a4934 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x1d44934)
#11 0x0000559e7abc40a9 clang::ParseAST(clang::Sema&, bool, bool) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x20640a9)
#12 0x0000559e7a8a37e7 clang::CodeGenAction::ExecuteAction() (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x1d437e7)
#13 0x0000559e7a4292a6 clang::FrontendAction::Execute() (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x18c92a6)
#14 0x0000559e7a3ef316 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x188f316)
#15 0x0000559e7a4db3c3 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x197b3c3)
#16 0x0000559e791dcaa8 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x67caa8)
#17 0x0000559e79187ded main (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x627ded)
#18 0x00007f2bb1a84ee3 __libc_start_main (/usr/lib/libc.so.6+0x26ee3)
#19 0x0000559e791dad1e _start (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x67ad1e)
Stack dump:
0. Program arguments: /home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-name test.c -mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -momit-leaf-frame-pointer -dwarf-column-info -debugger-tuning=gdb -coverage-notes-file /home/guatto/tmp/test.gcno -resource-dir /home/guatto/src/Tapir-Meta/tapir/build/lib/clang/5.0.0 -internal-isystem /usr/local/include -internal-isystem /home/guatto/src/Tapir-Meta/tapir/build/lib/clang/5.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O1 -fdebug-compilation-dir /home/guatto/tmp -ferror-limit 19 -fmessage-length 95 -fcilkplus -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o test.o -x c test.c
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'Function Pass Manager' on module 'test.c'.
4. Running pass 'Simplify the CFG' on function '@is_sorted_.ls'
clang-5.0: error: unable to execute command: Segmentation fault (core dumped)
clang-5.0: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 5.0.0 (https://github.com/wsmoses/Tapir-Clang 94b8db88cc38969262505a8b2942fb69c8fbacde) (https://github.com/wsmoses/Tapir-LLVM ba2f0eda34108ab64e581f2740b4d06eecc50709)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/guatto/src/Tapir-Meta/tapir/build/bin
clang-5.0: note: diagnostic msg: PLEASE submit a bug report to https://github.com/wsmoses/Tapir-LLVM/issues and include the crash backtrace, preprocessed source, and associated run script.
clang-5.0: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-5.0: note: diagnostic msg: /tmp/test-940b5d.c
clang-5.0: note: diagnostic msg: /tmp/test-940b5d.sh
clang-5.0: note: diagnostic msg:
********************
Thanks for the question. Exiting a cilk_for via control flow, such as break or return, is not supported. There are newer versions of Tapir that will catch and report these cases as errors, but we haven't backported those changes to master. (And, unfortunately, we've been remiss in keeping Tapir-Meta up to date.)
Hi! Is exiting a cilk_for via control-flow (break/return) supported? I've run into various issues trying to compile the following function.
Trying to compile without optimizations, I get the following error:
The error gets uglier after enabling optimizations:
I've attached the files mentioned above in test-940b5d.zip.
As far as I see, the above crash is deterministic. Replacing
return
withbreak
leads to non-deterministic, infrequent crashes.The crash I sometimes get is:
Here are the log files for this second crash.
The text was updated successfully, but these errors were encountered: