[LLVMdev] 2.6/trunk Execution Engine question

Reid Kleckner rnk at mit.edu
Tue Oct 6 14:15:54 PDT 2009


> 6. When ExecutionEngine::create was called with parameter
> "GVsWithCode" set to its default value of true, I got a segfault when
> trying to get a pointer to one of my globals.  JIT::getMemoryForGV was
> returning NULL in that case.  Explicitly passing false for
> "GVsWithCode" cleared it up.

That's no good.  Could you send me a stack trace and explain how you
got that to happen?  I was the last one to touch that code.

In your case, I would definitely set that parameter to false.  For
some reason, OpenCL requires that code and globals be allocated
together contiguously, and because backwards compatibility with them
is somehow more important than doing the right thing, that's still the
default behavior.  See http://llvm.org/bugs/show_bug.cgi?id=4483 .

Reid




More information about the llvm-dev mailing list