[LLVMbugs] [Bug 1984] New: kaleidoscope tutorial, segfault on dump

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Feb 4 21:49:43 PST 2008


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

           Summary: kaleidoscope tutorial, segfault on dump
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: tbptbp at gmail.com
                CC: llvmbugs at cs.uiuc.edu


The kaleidoscope tutorial starts to segfault at stage #4,
http://llvm.org/docs/tutorial/LangImpl4.html, with a fresh (as of now) trunk
checkout on my x86-64 linux box.

I've exhausted my options, fails in debug and release, with
Target: x86_64-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr
--disable-libmudflap --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.2.3 (Debian 4.2.3-1)
and

Target: x86_64-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.1.3 --program-suffix=-4.1
--enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug
--enable-mpfr --enable-checking=release x86_64-linux-gnu
Thread model: posix
gcc version 4.1.3 20080114 (prerelease) (Debian 4.1.2-19)

configured with ../configure --prefix=/usr/local/llvm --enable-jit

Simply ^D right away and

(gdb) bt full
#0  0x00000000007f62cc in llvm::isa<llvm::Type, llvm::Type const*> (Val=@0x28)
    at /usr/src/tbp/llvm/llvm/include/llvm/Support/Casting.h:116
No locals.
#1  0x00000000007f6cbb in llvm::cast<llvm::Type, llvm::Type const*> (Val=@0x28)
    at /usr/src/tbp/llvm/llvm/include/llvm/Support/Casting.h:199
        __PRETTY_FUNCTION__ = "typename llvm::cast_retty<To, From>::ret_type
llvm::cast(const Y&) [with X = llvm::Type, Y = const llvm::Type*]"
#2  0x00000000007f42f5 in fillTypeNameTable (M=0xd49670,
TypeNames=@0x7fffada4de28)
    at /usr/src/tbp/llvm/llvm/lib/VMCore/AsmWriter.cpp:252
        Ty = (const class llvm::Type *) 0x7f5d73
        ST = (const class llvm::TypeSymbolTable &) @0xd49710:
{<llvm::AbstractTypeUser> = {
    _vptr.AbstractTypeUser = 0xd5e2a0}, tmap = {_M_t = {
      _M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<const
std::basic_string<char, std::char_traits<char>, std::allocator<char> >, const
llvm::Type*> > >> =
{<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<const
std::basic_string<char, std::char_traits<char>, std::allocator<char> >, const
llvm::Type*> > >> = {<No data fields>}, <No data fields>}, 
        _M_key_compare = {<std::binary_function<const std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,const std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,bool>> = {<No data fields>}, <No
data fields>}, _M_header = {_M_color = 13923072, _M_parent = 0x0, _M_left =
0x0, _M_right = 0xd5de20}, _M_node_count = 13932304}}}, 
  LastUnique = 0}
        TI = {_M_node = 0x0}
#3  0x00000000007f8b9d in AssemblyWriter (this=0x7fffada4de10, o=@0xd42600,
Mac=@0x7fffada4dd80, M=0xd49670, AAW=0x0)
    at /usr/src/tbp/llvm/llvm/lib/VMCore/AsmWriter.cpp:733
No locals.
#4  0x00000000007f47e3 in llvm::Module::print (this=0xd49670, o=@0xd42600,
AAW=0x0)
    at /usr/src/tbp/llvm/llvm/lib/VMCore/AsmWriter.cpp:1443
        SlotTable = {TheModule = 0xd49670, TheFunction = 0x0, FunctionProcessed
= false, mMap = {_M_t = {
      _M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<const
llvm::Value* const, unsigned int> > >> =
{<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<const llvm::Value*
const, unsigned int> > >> = {<No data fields>}, <No data fields>}, 
        _M_key_compare = {<std::binary_function<const llvm::Value*,const
llvm::Value*,bool>> = {<No data fields>}, <No data fields>}, _M_header =
{_M_color = std::_S_red, _M_parent = 0x0, _M_left = 0x7fffada4dda0, 
          _M_right = 0x7fffada4dda0}, _M_node_count = 0}}}, mNext = 0, fMap =
{_M_t = {
      _M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<const
llvm::Value* const, unsigned int> > >> =
{<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<const llvm::Value*
const, unsigned int> > >> = {<No data fields>}, <No data fields>}, 
        _M_key_compare = {<std::binary_function<const llvm::Value*,const
llvm::Value*,bool>> = {<No data fields>}, <No data fields>}, _M_header =
{_M_color = std::_S_red, _M_parent = 0x0, _M_left = 0x7fffada4ddd8, 
          _M_right = 0x7fffada4ddd8}, _M_node_count = 0}}}, fNext = 0}
        W = {Out = @0xd42600, Machine = @0x7fffada4dd80, TheModule = 0xd49670,
TypeNames = {_M_t = {
      _M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<const llvm::Type*
const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >
> >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<const
llvm::Type* const, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > >> = {<No data fields>}, <No data fields>}, 
        _M_key_compare = {<std::binary_function<const llvm::Type*,const
llvm::Type*,bool>> = {<No data fields>}, <No data fields>}, _M_header =
{_M_color = std::_S_red, _M_parent = 0x0, _M_left = 0x7fffada4de30, _M_right =
0x7fffada4de30}, 
        _M_node_count = 0}}}, AnnotationWriter = 0x0}
#5  0x00000000007f8bc2 in llvm::Module::print (this=0xd49670, OS=@0xd42600)
    at /usr/src/tbp/llvm/llvm/include/llvm/Module.h:353
No locals.
#6  0x0000000000848b24 in llvm::Module::dump (this=0xd49670) at
/usr/src/tbp/llvm/llvm/lib/VMCore/Module.cpp:94
No locals.
#7  0x00000000004091d3 in main () at toy4.cc:597
        OurModuleProvider = {<llvm::ModuleProvider> = {_vptr.ModuleProvider =
0x9bcb10, 
    TheModule = 0xd49670}, <No data fields>}
        OurFPM = {FPM = 0xd5e100, MP = 0x7fffada4def0}
(gdb)


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