[LLVMbugs] [Bug 12164] New: clang++ crashes while compiling template on 64bits intel

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Mar 2 13:30:58 PST 2012


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

             Bug #: 12164
           Summary: clang++ crashes while compiling template on 64bits
                    intel
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: dan_k at o2.pl
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8133
  --> http://llvm.org/bugs/attachment.cgi?id=8133
Diagnostic information

clang++ crashes while compiling template on 64bit Intel. The build process
succeed on "Debug" settings but crashes on "Release" settings.

Here's the console output:
clang: warning: argument unused during compilation: '-finline-limit=1000'
In file included from ../../include/prcore/osx.hpp:62:
In file included from ../../include/prcore/configure.hpp:191:
In file included from ../../include/prcore/prcore.hpp:10:
In file included from ../../include/primport/klx.hpp:11:
In file included from
/Users/danielk/Development/base/prophecy/lib/macos/../../src/primport/klx.cpp:35:
../../include/prcore/../../src/extlib/strconv/strconv.h:41:19:{41:9-41:18}{41:21-41:22}:
warning: comparison of unsigned expression < 0 is always false
[-Wtautological-compare,2]
     if (tmp_value < 0)
         ~~~~~~~~~ ^ ~
../../include/prcore/../../src/extlib/strconv/strconv.h:61:75: note: in
instantiation of function template specialization 'itoa<unsigned long>'
requested here [2]
 inline int _ultoa_s(unsigned long value, char* result, int base) { return
itoa(value, result, base); }
                                                                           ^
../../include/prcore/../../src/extlib/strconv/strconv.h:41:19:{41:9-41:18}{41:21-41:22}:
warning: comparison of unsigned expression < 0 is always false
[-Wtautological-compare,2]
     if (tmp_value < 0)
         ~~~~~~~~~ ^ ~
../../include/prcore/../../src/extlib/strconv/strconv.h:63:94: note: in
instantiation of function template specialization 'itoa<unsigned long long>'
requested here [2]
 inline int _ui64toa_s(unsigned long long int value, char* result, size_t, int
base) { return itoa(value, result, base); }
                                                                               
              ^
Assertion failed: (BIP == IP || SE.DT->dominates(IP, BIP)), function
ReuseOrCreateCast, file ScalarEvolutionExpander.cpp, line 46.
0  libLLVM-3.1svn.dylib 0x0000000103b16b22 _ZL15PrintStackTracePv + 34
1  libLLVM-3.1svn.dylib 0x0000000103b17119 _ZL13SignalHandleri + 777
2  libsystem_c.dylib    0x00007fff950a1cfa _sigtramp + 26
3  libsystem_c.dylib    0xfffffffffffffff8 _sigtramp + 18446603338015695640
4  libLLVM-3.1svn.dylib 0x0000000103b16d66 abort + 22
5  libLLVM-3.1svn.dylib 0x0000000103b16d27 __assert_rtn + 55
6  libLLVM-3.1svn.dylib 0x0000000103339549
llvm::SCEVExpander::ReuseOrCreateCast(llvm::Value*, llvm::Type*,
llvm::Instruction::CastOps, llvm::ilist_iterator<llvm::Instruction>) + 393
7  libLLVM-3.1svn.dylib 0x00000001038ee27a (anonymous
namespace)::LSRInstance::Expand((anonymous namespace)::LSRFixup const&,
(anonymous namespace)::Formula const&, llvm::ilist_iterator<llvm::Instruction>,
llvm::SCEVExpander&, llvm::SmallVectorImpl<llvm::WeakVH>&) const + 2538
8  libLLVM-3.1svn.dylib 0x00000001038e5f2a (anonymous
namespace)::LSRInstance::LSRInstance(llvm::TargetLowering const*, llvm::Loop*,
llvm::Pass*) + 36538
9  libLLVM-3.1svn.dylib 0x00000001038dc630 (anonymous
namespace)::LoopStrengthReduce::runOnLoop(llvm::Loop*, llvm::LPPassManager&) +
48
10 libLLVM-3.1svn.dylib 0x00000001032c3874
llvm::LPPassManager::runOnFunction(llvm::Function&) + 900
11 libLLVM-3.1svn.dylib 0x00000001036435f4
llvm::FPPassManager::runOnFunction(llvm::Function&) + 340
12 libLLVM-3.1svn.dylib 0x000000010364388b
llvm::FPPassManager::runOnModule(llvm::Module&) + 75
13 libLLVM-3.1svn.dylib 0x00000001036439e4
llvm::MPPassManager::runOnModule(llvm::Module&) + 292
14 libLLVM-3.1svn.dylib 0x0000000103643fc2
llvm::PassManagerImpl::run(llvm::Module&) + 338
15 libLLVM-3.1svn.dylib 0x000000010364416d
llvm::PassManager::run(llvm::Module&) + 13
16 clang                0x000000010214e6ac
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 4940
17 clang                0x0000000102231bdf
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 639
18 clang                0x00000001022668e6 clang::ParseAST(clang::Sema&, bool)
+ 406
19 clang                0x0000000102230cad
clang::CodeGenAction::ExecuteAction() + 1165
20 clang                0x0000000102010012
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 978
21 clang                0x0000000101ff6822
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3042
22 clang                0x0000000101fed639 cc1_main(char const**, char const**,
char const*, void*) + 5561
23 clang                0x0000000101ff2b3a main + 682
24 clang                0x0000000101fec074 start + 52
Stack dump:
0.    Program arguments: /opt/local/libexec/llvm-3.1/bin/clang -cc1 -triple
x86_64-apple-macosx10.6.0 -emit-obj -disable-free -main-file-name klx.cpp
-pic-level 1 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2
-target-feature +sse3 -target-feature +sse -target-feature +sse2 -g
-coverage-file
/Users/danielk/Development/base/prophecy/lib/macos/./prophecy.build/Release/libprophecy.build/Objects-normal/x86_64/klx.o
-resource-dir /opt/local/libexec/llvm-3.1/bin/../lib/clang/3.1 -dependency-file
/Users/danielk/Development/base/prophecy/lib/macos/./prophecy.build/Release/libprophecy.build/Objects-normal/x86_64/klx.d
-MT dependencies -isysroot /Developer/SDKs/MacOSX10.6.sdk -D TIXML_USE_STL=1 -D
BSTRLIB_CAN_USE_STL -D BSTRLIB_CAN_USE_IOSTREAM -D BSTRLIB_THROWS_EXCEPTIONS -D
PRCORE_COMPILE_RUNTIME=1 -I
/Users/danielk/Development/base/prophecy/lib/macos/./prophecy.build/Release/libprophecy.build/libprophecy.hmap
-I ../../include -I /usr/local/include -I /opt/local/include -I
/Users/danielk/lib/include -I
/Users/danielk/Development/base/prophecy/lib/macos/./prophecy.build/Release/libprophecy.build/DerivedSources/x86_64
-I
/Users/danielk/Development/base/prophecy/lib/macos/./prophecy.build/Release/libprophecy.build/DerivedSources
-F/Users/danielk/lib -fmodule-cache-path
/var/folders/_5/j4l2ncmx3bz2qhw5y0th704r0000gn/T/clang-module-cache -O3
-Wno-trigraphs -Wreturn-type -Wnon-virtual-dtor -Woverloaded-virtual
-Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label
-Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wsign-compare
-Wshorten-64-to-32 -Wnewline-eof -Wc++0x-extensions -Wno-sign-conversion
-std=c++0x -fdeprecated-macro -ferror-limit 19 -fmessage-length 0
-fvisibility-inlines-hidden -fdiagnostics-print-source-range-info
-fdiagnostics-parseable-fixits -funroll-loops -stack-protector 1 -mstackrealign
-fblocks -fobjc-dispatch-method=mixed -fcxx-exceptions -fexceptions
-fpascal-strings -fdiagnostics-show-option -fdiagnostics-show-category id -o
/Users/danielk/Development/base/prophecy/lib/macos/./prophecy.build/Release/libprophecy.build/Objects-normal/x86_64/klx.o
-x c++
/Users/danielk/Development/base/prophecy/lib/macos/../../src/primport/klx.cpp 
1.    <eof> parser at end of file
2.    Code generation
3.    Running pass 'Function Pass Manager' on module
'/Users/danielk/Development/base/prophecy/lib/macos/../../src/primport/klx.cpp'.
4.    Running pass 'Loop Pass Manager' on function
'@_ZN6prcore5ArrayINS_6BitmapEE7setSizeEmb'
5.    Running pass 'Loop Strength Reduction' on basic block '%arrayctor.loop'
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang: note: diagnostic msg: Please submit a bug report to
http://llvm.org/bugs/ and include command line arguments and all diagnostic
information.
clang: note: diagnostic msg: Preprocessed source(s) and associated run
script(s) are located at:
clang: note: diagnostic msg:
/var/folders/_5/j4l2ncmx3bz2qhw5y0th704r0000gn/T/klx-xcTVTi.ii
clang: note: diagnostic msg:
/var/folders/_5/j4l2ncmx3bz2qhw5y0th704r0000gn/T/klx-xcTVTi.sh
Command /opt/local/libexec/llvm-3.1/bin/clang failed with exit code 254

-- 
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