[LLVMdev] JIT relocations and stub memory issue

Eric eric.yew at gmail.com
Mon Apr 13 08:09:44 PDT 2009


Hi All,

Can anyone explain why the MachineRelocation field "NeedsStub" is set to
true for GlobalValues on x86_64, but false on plain x86? This is causing the
JITEmitter to allocate a stub for every GlobalValue relocation it encounters
on x86_64, quickly exhausting the 512K region for stubs in the default JIT
memory manager. Is this expected behavior? Is there anyway to override the
stub generation? In this case, why are stubs even being allocated, my
understanding was that they were merely placeholders for lazy JIT?

The same application running on plain x86 requires no such stubs and
therefore runs correctly. There is currently no stub deallocation
functionality in the default memory manager, so the x86_64 version can only
JIT a few thousand functions before the ExecutionEngine crashes with a JIT:
Ran out of space for function stubs error.

Thoughts?

Thanks,
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090413/ad32a1c2/attachment.html>


More information about the llvm-dev mailing list