llvm-project
llvm-project copied to clipboard
[polly] IO sanbox violation in Polly invocation
Any simple invocation of polly (-mllvm -polly -O2) hits the IO sandbox violation. This is for the builds with assertions enabled (since IO sandbox checks are enabled for assert builds https://github.com/llvm/llvm-project/pull/184545) .
https://godbolt.org/z/j6xbb35x4
fatal error: error in backend: IO sandbox violation**
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: /opt/compiler-explorer/clang-assertions-trunk/bin/clang++ -g -o /app/output.s -mllvm --x86-asm-syntax=intel -fno-verbose-asm -S --gcc-toolchain=/opt/compiler-explorer/gcc-snapshot -fcolor-diagnostics -fno-crash-diagnostics -mllvm -polly -O2 <source>
1. <eof> parser at end of file
#0 0x00000000044e7908 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44e7908)
#1 0x00000000044e4734 llvm::sys::RunSignalHandlers() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44e4734)
#2 0x00000000044e4d54 llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44e4d54)
#3 0x00000000044244f6 llvm::CrashRecoveryContext::HandleExit(int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44244f6)
#4 0x00000000044dc1de llvm::sys::Process::Exit(int, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44dc1de)
#5 0x0000000000de21e0 LLVMErrorHandler(void*, char const*, bool) cc1_main.cpp:0:0
#6 0x000000000442e603 llvm::report_fatal_error(llvm::Twine const&, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x442e603)
#7 0x000000000442e790 llvm::reportFatalInternalError(llvm::StringRef) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x442e790)
#8 0x000000000449dd1d (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x449dd1d)
#9 0x000000000575d2a0 polly::buildCommonPollyPipeline(llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>&, llvm::OptimizationLevel, bool) (.constprop.0) RegisterPasses.cpp:0:0
#10 0x000000000575daf9 polly::buildLatePollyPipeline(llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>&, llvm::OptimizationLevel) RegisterPasses.cpp:0:0
#11 0x000000000595e7b8 llvm::PassBuilder::invokeVectorizerStartEPCallbacks(llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>&, llvm::OptimizationLevel) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x595e7b8)
#12 0x000000000596add2 llvm::PassBuilder::buildModuleOptimizationPipeline(llvm::OptimizationLevel, llvm::ThinOrFullLTOPhase) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x596add2)
#13 0x000000000596c651 llvm::PassBuilder::buildPerModuleDefaultPipeline(llvm::OptimizationLevel, llvm::ThinOrFullLTOPhase) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x596c651)
#14 0x0000000004913388 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&, clang::BackendConsumer*) BackendUtil.cpp:0:0
#15 0x0000000004914787 clang::emitBackendOutput(clang::CompilerInstance&, clang::CodeGenOptions&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4914787)
#16 0x0000000004fdddf7 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4fdddf7)
#17 0x0000000006d7f48c clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6d7f48c)
#18 0x0000000004fde248 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4fde248)
#19 0x00000000052f84e5 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x52f84e5)
#20 0x0000000005276bde clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x5276bde)
#21 0x00000000053f604d clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x53f604d)
#22 0x0000000000de4b12 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xde4b12)
#23 0x0000000000ddb44a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>) driver.cpp:0:0
#24 0x0000000000ddb5cd int llvm::function_ref<int (llvm::SmallVectorImpl<char const*>&)>::callback_fn<clang_main(int, char**, llvm::ToolContext const&)::'lambda'(llvm::SmallVectorImpl<char const*>&)>(long, llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
#25 0x0000000005047609 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#26 0x0000000004424434 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4424434)
#27 0x0000000005047c36 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) Job.cpp:0:0
#28 0x0000000005006d12 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x5006d12)
#29 0x0000000005007cbe clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x5007cbe)
#30 0x000000000500f875 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x500f875)
#31 0x0000000000de0e74 clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xde0e74)
#32 0x0000000000c983da main (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xc983da)
#33 0x000073c632829d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#34 0x000073c632829e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#35 0x0000000000ddaee5 _start (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xddaee5)
clang++: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Compiler returned: 70
@llvm/issue-subscribers-polly
Author: Chris Jenneisch (chrisj-quic)
Any simple invocation of polly (-mllvm -polly -O2) hits the IO sandbox violation. This is for the builds with assertions enabled (since IO sandbox checks are enabled for assert builds https://github.com/llvm/llvm-project/pull/184545) .
https://godbolt.org/z/j6xbb35x4
fatal error: error in backend: IO sandbox violation**
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: /opt/compiler-explorer/clang-assertions-trunk/bin/clang++ -g -o /app/output.s -mllvm --x86-asm-syntax=intel -fno-verbose-asm -S --gcc-toolchain=/opt/compiler-explorer/gcc-snapshot -fcolor-diagnostics -fno-crash-diagnostics -mllvm -polly -O2 <source>
1. <eof> parser at end of file
#<!-- -->0 0x00000000044e7908 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44e7908)
#<!-- -->1 0x00000000044e4734 llvm::sys::RunSignalHandlers() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44e4734)
#<!-- -->2 0x00000000044e4d54 llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44e4d54)
#<!-- -->3 0x00000000044244f6 llvm::CrashRecoveryContext::HandleExit(int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44244f6)
#<!-- -->4 0x00000000044dc1de llvm::sys::Process::Exit(int, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44dc1de)
#<!-- -->5 0x0000000000de21e0 LLVMErrorHandler(void*, char const*, bool) cc1_main.cpp:0:0
#<!-- -->6 0x000000000442e603 llvm::report_fatal_error(llvm::Twine const&, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x442e603)
#<!-- -->7 0x000000000442e790 llvm::reportFatalInternalError(llvm::StringRef) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x442e790)
#<!-- -->8 0x000000000449dd1d (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x449dd1d)
#<!-- -->9 0x000000000575d2a0 polly::buildCommonPollyPipeline(llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>&, llvm::OptimizationLevel, bool) (.constprop.0) RegisterPasses.cpp:0:0
#<!-- -->10 0x000000000575daf9 polly::buildLatePollyPipeline(llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>&, llvm::OptimizationLevel) RegisterPasses.cpp:0:0
#<!-- -->11 0x000000000595e7b8 llvm::PassBuilder::invokeVectorizerStartEPCallbacks(llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>&, llvm::OptimizationLevel) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x595e7b8)
#<!-- -->12 0x000000000596add2 llvm::PassBuilder::buildModuleOptimizationPipeline(llvm::OptimizationLevel, llvm::ThinOrFullLTOPhase) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x596add2)
#<!-- -->13 0x000000000596c651 llvm::PassBuilder::buildPerModuleDefaultPipeline(llvm::OptimizationLevel, llvm::ThinOrFullLTOPhase) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x596c651)
#<!-- -->14 0x0000000004913388 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&, clang::BackendConsumer*) BackendUtil.cpp:0:0
#<!-- -->15 0x0000000004914787 clang::emitBackendOutput(clang::CompilerInstance&, clang::CodeGenOptions&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4914787)
#<!-- -->16 0x0000000004fdddf7 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4fdddf7)
#<!-- -->17 0x0000000006d7f48c clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6d7f48c)
#<!-- -->18 0x0000000004fde248 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4fde248)
#<!-- -->19 0x00000000052f84e5 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x52f84e5)
#<!-- -->20 0x0000000005276bde clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x5276bde)
#<!-- -->21 0x00000000053f604d clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x53f604d)
#<!-- -->22 0x0000000000de4b12 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xde4b12)
#<!-- -->23 0x0000000000ddb44a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>) driver.cpp:0:0
#<!-- -->24 0x0000000000ddb5cd int llvm::function_ref<int (llvm::SmallVectorImpl<char const*>&)>::callback_fn<clang_main(int, char**, llvm::ToolContext const&)::'lambda'(llvm::SmallVectorImpl<char const*>&)>(long, llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
#<!-- -->25 0x0000000005047609 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#<!-- -->26 0x0000000004424434 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4424434)
#<!-- -->27 0x0000000005047c36 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) Job.cpp:0:0
#<!-- -->28 0x0000000005006d12 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x5006d12)
#<!-- -->29 0x0000000005007cbe clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x5007cbe)
#<!-- -->30 0x000000000500f875 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x500f875)
#<!-- -->31 0x0000000000de0e74 clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xde0e74)
#<!-- -->32 0x0000000000c983da main (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xc983da)
#<!-- -->33 0x000073c632829d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#<!-- -->34 0x000073c632829e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#<!-- -->35 0x0000000000ddaee5 _start (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xddaee5)
clang++: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Compiler returned: 70