[LLVMdev] A beginner question
luked at cs.rochester.edu
Sat Jul 4 13:08:16 CDT 2009
Carter Cheng wrote:
> The line comes up on a back trace using gdb. I think it's the right line (I have tried it on two separate machines one using Fedora 11 and g++ 4.4.x and the other Ubunto and g++ 4.3.3) and the situation is exceptionally odd since it only occurs when compiling my Runtime.cpp and doesnt happen when compiling other files. This is with LLVM 2.5.
Just a thought, but this can happen due to undefined static
initialization ordering. If the code is getting called based on some
static initialization that is happening before main() then that could be
your problem. This happened to me once through a convoluted chain of
> I did look at the Type.cpp code and it should be impossible but it's the error I am getting.
> --- On Sat, 7/4/09, Nick Lewycky <nicholas at mxc.ca> wrote:
>> From: Nick Lewycky <nicholas at mxc.ca>
>> Subject: Re: [LLVMdev] A beginner question
>> To: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
>> Date: Saturday, July 4, 2009, 9:06 AM
>> Carter Cheng wrote:
>>> I feel a bit bad for always asking beginner questions
>> here but I am having some difficulties with a runtime error
>> with which I could use some help diagnosing.
>>> 1) I am getting the assertion failure
>>> main: Type.cpp:1309: static llvm::PointerType*
>> llvm::PointerType::get(const llvm::Type*, unsigned int):
>> Assertion `ValueType && "Can't get a pointer to
>> <null> type!"' failed.
>>> from this line-
>> llvm::PointerType::getUnqual(llvm::Type::Int32Ty) );
>>> Is something needed to initialize the
>> Type::Int32Ty is a static const Type* with an initializer.
>> You might
>> need static constructors to run in order to initialize it,
>> but in C++
>> that should require no action on your part.
>> It should be impossible for that line of code to cause that
>> Are you sure you're blaming the right line? If so then you
>> probably have
>> a larger problem with your C++ environment, such as LLVM
>> miscompiled by your system compiler. (It's not one of the
>> ones listed on
>> llvm.org/docs/GettingStarted.html#brokengcc is it?)
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the LLVMdev