[LLVMbugs] [Bug 10973] New: clang drains memory while compiling PHP (crypt_sha512.c)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Sep 21 01:36:32 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=10973

           Summary: clang drains memory while compiling PHP
                    (crypt_sha512.c)
           Product: clang
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: adam at NetBSD.org
                CC: llvmbugs at cs.uiuc.edu


While trying to compile PHP 5.3.8, the compilation stops at
ext/standard/crypt_sha512.c. 'clang' process increasingly allocates more and
more memory. I had to abort after about 3-4GB has been allocated.

This is llvm/clang rev 140239. The problem does not occur with "Apple clang
version 3.0 (tags/Apple/clang-211.9) (based on LLVM 3.0svn)" from Xcode 4.2
build 4D177b.

The problem only shows up when using optimisation (-O1 or above).

Output with -O1 -v:

===> Building for php-5.3.8
/bin/sh /Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8/libtool --silent
--preserve-dup-deps --mode=compile clang  -Iext/standard/
-I/Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8/ext/standard/
-DPHP_ATOM_INC -I/Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8/include
-I/Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8/main
-I/Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8
-I/Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8/ext/date/lib
-I/usr/pkg/include/libxml2
-I/Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8/TSRM
-I/Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8/Zend  -isysroot
/Developer/SDKs/MacOSX10.7.sdk -I/usr/pkg/include -I/usr/include
-no-cpp-precomp -I/usr/pkg/include  -march=core2 -isysroot
/Developer/SDKs/MacOSX10.7.sdk -O1 -v    -I/usr/pkg/include -I/usr/include
-fvisibility=hidden  -c
/Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8/ext/standard/crypt_sha512.c
-o ext/standard/crypt_sha512.lo 
clang version 3.0 (trunk)
Target: x86_64-apple-darwin11.1.0
Thread model: posix
clang: warning: argument unused during compilation: '-no-cpp-precomp'
 "/usr/pkg/bin/clang" -cc1 -triple x86_64-apple-macosx10.7.1 -emit-obj
-disable-free -disable-llvm-verifier -main-file-name crypt_sha512.c -pic-level
1 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2
-target-linker-version 127.2 -v -coverage-file ext/standard/crypt_sha512.o
-resource-dir /usr/pkg/bin/../lib/clang/3.0 -isysroot
/Developer/SDKs/MacOSX10.7.sdk -isysroot /Developer/SDKs/MacOSX10.7.sdk -D
PHP_ATOM_INC -I ext/standard/ -I
/Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8/ext/standard/ -I
/Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8/include -I
/Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8/main -I
/Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8 -I
/Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8/ext/date/lib -I
/Volumes/Data/dist/pkgsrc/lang/php53/work/.buildlink/include/libxml2 -I
/Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8/TSRM -I
/Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8/Zend -I
/Volumes/Data/dist/pkgsrc/lang/php53/work/.buildlink/include
-fmodule-cache-path
/var/folders/4v/d7vjg23d50n_q4q8lm2l37tc0000gn/T/clang-module-cache -O1
-ferror-limit 19 -fmessage-length 80 -fvisibility hidden -stack-protector 1
-fblocks -fdiagnostics-show-option -fcolor-diagnostics -o
ext/standard/crypt_sha512.o -x c
/Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8/ext/standard/crypt_sha512.c
clang -cc1 version 3.0 based upon llvm 3.0svn hosted on
x86_64-apple-darwin11.1.0
ignoring duplicate directory "ext/standard/"
#include "..." search starts here:
#include <...> search starts here:
 ext/standard/
 /Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8/include
 /Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8/main
 /Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8
 /Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8/ext/date/lib
 /Volumes/Data/dist/pkgsrc/lang/php53/work/.buildlink/include/libxml2
 /Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8/TSRM
 /Volumes/Data/dist/pkgsrc/lang/php53/work/php-5.3.8/Zend
 /Volumes/Data/dist/pkgsrc/lang/php53/work/.buildlink/include
 /Developer/SDKs/MacOSX10.7.sdk/usr/local/include
 /usr/pkg/bin/../lib/clang/3.0/include
 /Developer/SDKs/MacOSX10.7.sdk/usr/include
 /Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks (framework directory)
 /Developer/SDKs/MacOSX10.7.sdk/Library/Frameworks (framework directory)
End of search list.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list