[llvm-bugs] [Bug 41630] New: out of memory error when compiling with -O2 using mingw-clang

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Apr 27 14:29:23 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=41630

            Bug ID: 41630
           Summary: out of memory error when compiling with -O2 using
                    mingw-clang
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: tom at ritter.vg
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

The command takes ~14 minutes to run on my machine. 

> /builds/worker/workspace/build/src/sccache2/sccache /builds/worker/workspace/build/src/clang/bin/i686-w64-mingw32-clang++ -mwindows -o BlockReflowInput.o -c  -I/builds/worker/workspace/build/src/obj-firefox/dist/stl_wrappers -DDEBUG=1 -DWIN32_LEAN_AND_MEAN -D_WIN32 -DWIN32 -D_CRT_RAND_S -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DOS_WIN=1 -D_UNICODE -DCHROMIUM_BUILD -DU_STATIC_IMPLEMENTATION -DUNICODE -D_WINDOWS -D_SECURE_ATL -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/worker/workspace/build/src/layout/generic -I/builds/worker/workspace/build/src/obj-firefox/layout/generic -I/builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/_ipdlheaders -I/builds/worker/workspace/build/src/ipc/chromium/src -I/builds/worker/workspace/build/src/ipc/glue -I/builds/worker/workspace/build/src/dom/plugins/base -I/builds/worker/workspace/build/src/layout/base -I/builds/worker/workspace/build/src/layout/forms -I/builds/worker/workspace/build/src/layout/painting -I/builds/worker/workspace/build/src/layout/style -I/builds/worker/workspace/build/src/layout/svg -I/builds/worker/workspace/build/src/layout/tables -I/builds/worker/workspace/build/src/layout/xul -I/builds/worker/workspace/build/src/docshell/base -I/builds/worker/workspace/build/src/dom/base -I/builds/worker/workspace/build/src/dom/html -I/builds/worker/workspace/build/src/dom/xul -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nss -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h -Qunused-arguments -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wno-unknown-pragmas -Wno-unused-function -Wno-conversion-null -Wno-switch -Wno-enum-compare -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-sized-deallocation -fms-extensions -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-strict-aliasing -mms-bitfields -Wno-incompatible-ms-struct -mstackrealign -fno-rtti -ffunction-sections -fdata-sections -Wa,-mbig-obj -fno-exceptions -fno-math-errno -pipe -g -gcodeview -O2 -fno-omit-frame-pointer -funwind-tables -I/builds/worker/workspace/build/src/obj-firefox/dist/include/cairo -Wno-error=shadow  -MD -MP -MF .deps/BlockReflowInput.o.pp   /builds/worker/workspace/build/src/layout/generic/BlockReflowInput.cpp
> LLVM ERROR: out of memory
> Stack dump:
> 0.Program arguments: /builds/worker/workspace/build/src/clang/bin/clang-8 -cc1 -triple i686-w64-windows-gnu -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-name BlockReflowInput.cpp -mrelocation-model static -mthread-model posix -mdisable-fp-elim -relaxed-aliasing -masm-verbose -mconstructor-aliases -mms-bitfields -munwind-tables -target-cpu pentium4 -gcodeview -debug-info-kind=limited -debugger-tuning=gdb -momit-leaf-frame-pointer -ffunction-sections -fdata-sections -coverage-notes-file /builds/worker/workspace/build/src/obj-firefox/layout/generic/BlockReflowInput.gcno -resource-dir /builds/worker/workspace/build/src/clang/lib/clang/8.0.0 -dependency-file .deps/BlockReflowInput.o.pp -sys-header-deps -MP -MT BlockReflowInput.o -include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h -I /builds/worker/workspace/build/src/obj-firefox/dist/stl_wrappers -D DEBUG=1 -D WIN32_LEAN_AND_MEAN -D _WIN32 -D WIN32 -D _CRT_RAND_S -D CERT_CHAIN_PARA_HAS_EXTRA_FIELDS -D OS_WIN=1 -D _UNICODE -D CHROMIUM_BUILD -D U_STATIC_IMPLEMENTATION -D UNICODE -D _WINDOWS -D _SECURE_ATL -D STATIC_EXPORTABLE_JS_API -D MOZ_HAS_MOZGLUE -D MOZILLA_INTERNAL_API -D IMPL_LIBXUL -I /builds/worker/workspace/build/src/layout/generic -I /builds/worker/workspace/build/src/obj-firefox/layout/generic -I /builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/_ipdlheaders -I /builds/worker/workspace/build/src/ipc/chromium/src -I /builds/worker/workspace/build/src/ipc/glue -I /builds/worker/workspace/build/src/dom/plugins/base -I /builds/worker/workspace/build/src/layout/base -I /builds/worker/workspace/build/src/layout/forms -I /builds/worker/workspace/build/src/layout/painting -I /builds/worker/workspace/build/src/layout/style -I /builds/worker/workspace/build/src/layout/svg -I /builds/worker/workspace/build/src/layout/tables -I /builds/worker/workspace/build/src/layout/xul -I /builds/worker/workspace/build/src/docshell/base -I /builds/worker/workspace/build/src/dom/base -I /builds/worker/workspace/build/src/dom/html -I /builds/worker/workspace/build/src/dom/xul -I /builds/worker/workspace/build/src/obj-firefox/dist/include -I /builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -I /builds/worker/workspace/build/src/obj-firefox/dist/include/nss -D MOZILLA_CLIENT -U _FORTIFY_SOURCE -D _FORTIFY_SOURCE=2 -U _FORTIFY_SOURCE -D _FORTIFY_SOURCE=2 -I /builds/worker/workspace/build/src/obj-firefox/dist/include/cairo -isysroot /builds/worker/workspace/build/src/clang/bin/../i686-w64-mingw32 -internal-isystem /builds/worker/workspace/build/src/clang/bin/../i686-w64-mingw32/i686-w64-mingw32/include/c++/v1 -internal-isystem /builds/worker/workspace/build/src/clang/bin/../i686-w64-mingw32/include/c++/v1 -internal-isystem /builds/worker/workspace/build/src/clang/lib/clang/8.0.0/include -internal-isystem /builds/worker/workspace/build/src/clang/bin/../i686-w64-mingw32/i686-w64-mingw32/include -internal-isystem /builds/worker/workspace/build/src/clang/bin/../i686-w64-mingw32/include -O2 -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wno-unknown-pragmas -Wno-unused-function -Wno-conversion-null -Wno-switch -Wno-enum-compare -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-incompatible-ms-struct -Wno-error=shadow -fdeprecated-macro -fdebug-compilation-dir /builds/worker/workspace/build/src/obj-firefox/layout/generic -ferror-limit 19 -fmessage-length 0 -mstackrealign -fno-rtti -fms-extensions -fobjc-runtime=gcc -fsjlj-exceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o BlockReflowInput.o -x c++ /builds/worker/workspace/build/src/layout/generic/BlockReflowInput.cpp -faddrsig
> 1.<eof> parser at end of file
> 2.Code generation
> 3.Running pass 'Function Pass Manager' on module '/builds/worker/workspace/build/src/layout/generic/BlockReflowInput.cpp'.
> 4.Running pass 'X86 DAG->DAG Instruction Selection' on function '@_ZN7mozilla16BlockReflowInput8AddFloatEP12nsLineLayoutP8nsIFramei'
> #0 0x00007f9ce2d69ff4 PrintStackTraceSignalHandler(void*) (/builds/worker/workspace/build/src/clang/bin/../lib/libLLVM-8svn.so+0x61bff4)
> #1 0x00007f9ce2d67fde llvm::sys::RunSignalHandlers() (/builds/worker/workspace/build/src/clang/bin/../lib/libLLVM-8svn.so+0x619fde)
> #2 0x00007f9ce2d6a1b8 SignalHandler(int) (/builds/worker/workspace/build/src/clang/bin/../lib/libLLVM-8svn.so+0x61c1b8)
> #3 0x00007f9ce52150e0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x110e0)
> #4 0x00007f9ce20ddfff gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x32fff)
> #5 0x00007f9ce20df42a abort (/lib/x86_64-linux-gnu/libc.so.6+0x3442a)
> #6 0x00007f9ce2cd1f73 llvm::report_bad_alloc_error(char const*, bool) (/builds/worker/workspace/build/src/clang/bin/../lib/libLLVM-8svn.so+0x583f73)
> #7 0x00007f9ce2d0e3bd llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long) (/builds/worker/workspace/build/src/clang/bin/../lib/libLLVM-8svn.so+0x5c03bd)
> #8 0x00007f9ce31a1909 (anonymous namespace)::DAGCombiner::AddToWorklist(llvm::SDNode*) (/builds/worker/workspace/build/src/clang/bin/../lib/libLLVM-8svn.so+0xa53909)
> #9 0x00007f9ce31f9061 (anonymous namespace)::DAGCombiner::SimplifyBinOpWithSameOpcodeHands(llvm::SDNode*) (/builds/worker/workspace/build/src/clang/bin/../lib/libLLVM-8svn.so+0xaab061)
> #10 0x00007f9ce31d833a (anonymous namespace)::DAGCombiner::visitAND(llvm::SDNode*) (/builds/worker/workspace/build/src/clang/bin/../lib/libLLVM-8svn.so+0xa8a33a)
> #11 0x00007f9ce31a6de2 (anonymous namespace)::DAGCombiner::visit(llvm::SDNode*) (/builds/worker/workspace/build/src/clang/bin/../lib/libLLVM-8svn.so+0xa58de2)
> #12 0x00007f9ce31a2d8c (anonymous namespace)::DAGCombiner::combine(llvm::SDNode*) (/builds/worker/workspace/build/src/clang/bin/../lib/libLLVM-8svn.so+0xa54d8c)
> #13 0x00007f9ce31a2353 llvm::SelectionDAG::Combine(llvm::CombineLevel, llvm::AAResults*, llvm::CodeGenOpt::Level) (/builds/worker/workspace/build/src/clang/bin/../lib/libLLVM-8svn.so+0xa54353)
> #14 0x00007f9ce334a6ef llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/builds/worker/workspace/build/src/clang/bin/../lib/libLLVM-8svn.so+0xbfc6ef)
> #15 0x00007f9ce3349761 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/builds/worker/workspace/build/src/clang/bin/../lib/libLLVM-8svn.so+0xbfb761)
> #16 0x00007f9ce3346a36 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/builds/worker/workspace/build/src/clang/bin/../lib/libLLVM-8svn.so+0xbf8a36)
> #17 0x00007f9ce3f3323e (anonymous namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/builds/worker/workspace/build/src/clang/bin/../lib/libLLVM-8svn.so+0x17e523e)
> #18 0x00007f9ce3000683 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/builds/worker/workspace/build/src/clang/bin/../lib/libLLVM-8svn.so+0x8b2683)
> #19 0x00007f9ce2e67bfa llvm::FPPassManager::runOnFunction(llvm::Function&) (/builds/worker/workspace/build/src/clang/bin/../lib/libLLVM-8svn.so+0x719bfa)
> #20 0x00007f9ce2e67f83 llvm::FPPassManager::runOnModule(llvm::Module&) (/builds/worker/workspace/build/src/clang/bin/../lib/libLLVM-8svn.so+0x719f83)
> #21 0x00007f9ce2e684ff llvm::legacy::PassManagerImpl::run(llvm::Module&) (/builds/worker/workspace/build/src/clang/bin/../lib/libLLVM-8svn.so+0x71a4ff)
> #22 0x0000000000632cb7 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> >) (/builds/worker/workspace/build/src/clang/bin/clang-8+0x632cb7)
> #23 0x0000000000b2beb1 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/builds/worker/workspace/build/src/clang/bin/clang-8+0xb2beb1)
> #24 0x0000000001022723 clang::ParseAST(clang::Sema&, bool, bool) (/builds/worker/workspace/build/src/clang/bin/clang-8+0x1022723)
> #25 0x0000000000a97297 clang::FrontendAction::Execute() (/builds/worker/workspace/build/src/clang/bin/clang-8+0xa97297)
> #26 0x0000000000a3e898 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/builds/worker/workspace/build/src/clang/bin/clang-8+0xa3e898)
> #27 0x0000000000b280db clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/builds/worker/workspace/build/src/clang/bin/clang-8+0xb280db)
> #28 0x00000000005f544d cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/builds/worker/workspace/build/src/clang/bin/clang-8+0x5f544d)
> #29 0x00000000005f39a3 main (/builds/worker/workspace/build/src/clang/bin/clang-8+0x5f39a3)
> #30 0x00007f9ce20cb2e1 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e1)
> #31 0x00000000005f0ddd _start (/builds/worker/workspace/build/src/clang/bin/clang-8+0x5f0ddd)
> clang-8: error: unable to execute command: Aborted
> clang-8: error: clang frontend command failed due to signal (use -v to see invocation)
> clang version 8.0.0 (trunk) (llvm/trunk 348363)
> Target: i686-w64-windows-gnu
> Thread model: posix
> InstalledDir: /builds/worker/workspace/build/src/clang/bin
> clang-8: 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-8: note: diagnostic msg:
> ********************
> PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
> Preprocessed source(s) and associated run script(s) are located at:
> clang-8: note: diagnostic msg: /tmp/BlockReflowInput-ab887b.cpp
> clang-8: note: diagnostic msg: /tmp/BlockReflowInput-ab887b.sh
> clang-8: note: diagnostic msg:
> ********************

Will attach and point to input files

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190427/a638165b/attachment-0001.html>


More information about the llvm-bugs mailing list