[LLVMdev] 2.6/trunk Execution Engine question

Kenneth Uildriks kennethuil at gmail.com
Tue Oct 6 16:32:02 PDT 2009


On Tue, Oct 6, 2009 at 5:49 PM, Reid Kleckner <rnk at mit.edu> wrote:
>> Also, the null pointer is coming from a call to JCE->allocateSpace().
>> This is a virtual function; I'm trying to discover what subclass it
>> is.
>
> So, there's JITEmitter::allocateSpace which overrides
> JITCodeEmitter::allocateSpace(), but *most* of the time it just calls
> JITCodeEmitter::allocateSpace().  In particular, it does that if the
> emitter is already emitting a function (BufferBegin will be non-null).
>  If there is no current function, it asks the JITMemoryManager for
> some space (JITMemoryManager::allocateSpace), which looked broken the
> last time I checked, but should work in theory.  I can't see any way
> that it would return NULL, though.
>
> Reid
>

It just occurred to me... in the case where it's failing, the
ExecutionEngine was trying to JIT a global, and it had never JITted
any functions!  I'll work up a small test case, but I think it's
relevant since the thing is trying to allocate the globals with the
functions.




More information about the llvm-dev mailing list