[LLVMbugs] [Bug 11831] New: -ccc-host-triple causes assert

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jan 23 03:52:03 PST 2012


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

             Bug #: 11831
           Summary: -ccc-host-triple causes assert
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: hkultala at cs.tut.fi
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


clang -O0 -ccc-host-triple tce-tut-llvm -emit-llvm -c foo2.c -o foo.bc

where foo2.c can be empty file

causes assertion:


clang: /home/hkultala26/src/llvm-trunk/llvm/include/llvm/ADT/SmallVector.h:154:
const T& llvm::SmallVectorTemplateCommon<T>::operator[](unsigned int) const
[with T = const char*]: Assertion `begin() + idx < end()' failed.
0  libLLVM-3.1svn.so 0x00007f8067de1d8f
1  libLLVM-3.1svn.so 0x00007f8067de4002
2  libpthread.so.0   0x00007f8067003b40
3  libc.so.6         0x00007f8066301ba5 gsignal + 53
4  libc.so.6         0x00007f80663056b0 abort + 384
5  libc.so.6         0x00007f80662faa71 __assert_fail + 241
6  clang             0x00000000005b5858
clang::driver::Driver::BuildCompilation(llvm::ArrayRef<char const*>) + 4152
7  clang             0x000000000053581e main + 4814
8  libc.so.6         0x00007f80662ecd8e __libc_start_main + 254
9  clang             0x000000000052aef9
Stack dump:
0.      Program arguments: clang -O0 -ccc-host-triple tce-tut-llvm -emit-llvm
-c foo2.c -o foo.bc 
1.      Compilation construction
Aborted




when run inside gdb:

Starting program: /home/hkultala26/tce/bin/clang -O0 -ccc-host-triple
tce-tut-llvm -emit-llvm -c foo2.c -o foo.bc
[Thread debugging using libthread_db enabled]
clang: /home/hkultala26/src/llvm-trunk/llvm/include/llvm/ADT/SmallVector.h:154:
const T& llvm::SmallVectorTemplateCommon<T>::operator[](unsigned int) const
[with T = const char*]: Assertion `begin() + idx < end()' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff598bba5 in raise (sig=<value optimized out>) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
64      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
        in ../nptl/sysdeps/unix/sysv/linux/raise.c



(gdb) bt
#0  0x00007ffff598bba5 in raise (sig=<value optimized out>) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007ffff598f6b0 in abort () at abort.c:92
#2  0x00007ffff5984a71 in __assert_fail (assertion=0x108a207 "begin() + idx <
end()", file=<value optimized out>, line=154, 
    function=0x10a0fa0 "const T&
llvm::SmallVectorTemplateCommon<T>::operator[](unsigned int) const [with T =
const char*]") at assert.c:81
#3  0x00000000005b5858 in operator[] (this=0x7fffffffd4e0, ArgList=...) at
/home/hkultala26/src/llvm-trunk/llvm/include/llvm/ADT/SmallVector.h:154
#4  getValue (this=0x7fffffffd4e0, ArgList=...) at
/home/hkultala26/src/llvm-trunk/llvm/tools/clang/lib/Driver/../../include/clang/Driver/Arg.h:87
#5  clang::driver::Driver::BuildCompilation (this=0x7fffffffd4e0, ArgList=...)
at Driver.cpp:320
#6  0x000000000053581e in main (argc_=<value optimized out>, argv_=<value
optimized out>) at driver.cpp:451

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