Closed llvmbot closed 6 years ago
I don't think we need to track this anymore, essentially it was an OOM while compiling RecursiveASTVisitorTest, which is a very large TU.
Anyways, the workarounds (any of the following):
Not particularly motivated to debug /usr/bin/as.
Other things to try: use newer newer 'as' from opendarwin cctools.
Interestingly enough, if I copy and rename that translation unit into the build directory (where I was about to reduce the test case), the failure is no longer triggered. Here's a part of the diff between the two .s files:
--- asm-crash.s 2013-04-22 23:04:36.000000000 -0700 +++ RecursiveASTVisitorTest.s 2013-04-22 22:37:14.000000000 -0700 @@ -2,7 +2,7 @@ .section TEXT,picsymbolstub1,symbol_stubs,pure_instructions,32 .machine ppc .stabs "/Users/fang/local/src/LLVM-svn/gcc40-cmake-build/tools/clang/unittests/Tooling/",100,0,4,Ltext0
Something about these stabs debug directives is triggering the error.
At line 34316 in RecursiveASTVisitorTest.s:
.stabs "TestVisitor
The line that follows is so long that it wraps around my terminal window so many times, that it still doesn't fit on one screen. The ask-crash.s produced by the local copy looks similar in size.
Extended Description
This is not a bug, but should be documented. On powerpc-darwin8, RecursiveASTVisitorTest causes the system assembler to bad_alloc/out-of-memory. System compiler is apple-gcc-4.0.1, and assembler is Apple's GNU as 1.38. This did not occur before r179583, and was first observed r180052.
[ 88%] Building CXX object tools/clang/unittests/Tooling/CMakeFiles/ToolingTests.dir/RecursiveASTVisitorTest.cpp.o cd /Users/fang/local/src/LLVM-svn/gcc40-cmake-build/tools/clang/unittests/Tooling && /Users/fang/local/bin/ccg++ -DCLANG_ENABLE_ARCMT -DCLANG_ENABLE_REWRITER -DCLANG_ENABLE_STATIC_ANALYZER -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -DSTDC_CONSTANT_MACROS -DSTDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-common -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-uninitialized -Wnon-virtual-dtor -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -g -I/Users/fang/local/src/LLVM-svn/gcc40-cmake-build/tools/clang/unittests/Tooling -I/Users/fang/local/src/LLVM-svn/llvm/tools/clang/unittests/Tooling -I/Users/fang/local/src/LLVM-svn/llvm/tools/clang/include -I/Users/fang/local/src/LLVM-svn/gcc40-cmake-build/tools/clang/include -I/Users/fang/local/src/LLVM-svn/gcc40-cmake-build/include -I/Users/fang/local/src/LLVM-svn/llvm/include -I/Users/fang/local/src/LLVM-svn/llvm/utils/unittest/googletest/include -fno-exceptions -fno-rtti -Wno-variadic-macros -o CMakeFiles/ToolingTests.dir/RecursiveASTVisitorTest.cpp.o -c /Users/fang/local/src/LLVM-svn/llvm/tools/clang/unittests/Tooling/RecursiveASTVisitorTest.cpp as(20706) malloc: vm_allocate(size=2147487744) failed (error code=3) as(20706) malloc: error: can't allocate region as(20706) malloc: set a breakpoint in szone_error to debug /var/tmp//ccxE0lI4.s:34316:FATAL:virtual memory exceeded make[3]: [tools/clang/unittests/Tooling/CMakeFiles/ToolingTests.dir/RecursiveASTVisitorTest.cpp.o] Error 1
This will need to be diagnosed and worked around, I'm afraid. I cannot resume check-clang without a workaround or fix.