Displaying 20 results from an estimated 79 matches for "getaddress".
2017 Apr 09
2
Possible stack corruption during call to JITSymbol::getAddress()
...free to point me in the correct direction. I could be doing
something wrong here but stackoverflow didn't feel like the correct place
for this since there's so little there about LLVM ORC.
Basically, I have a reproduction case (below) where if I throw an exception
before I call JITSymbol::getAddress() everything works properly but
throwing the same exception afterward will result in a SIGSEGV during stack
unwinding. This suggests to me that somehow the stack is getting corrupted
during the JITSymbol::getAddress() call.
This problem was initially discovered while working on my own project.
Wh...
2015 Jul 15
2
[LLVMdev] SymbolRef and getSize
...ile);
if (std::error_code ec = BinaryOrErr.getError()) {
return ec.value();
}
Binary &Binary = *BinaryOrErr.get().getBinary();
object::ObjectFile *objfile;
objfile = dyn_cast<ObjectFile>(&Binary);
for (const SymbolRef &Symbol : objfile->symbols()) {
uint64_t size;
Symbol.getAddress(size);
}
####
During my previous search, I check machODump.cpp in order to see of the list all the function.
They never use the getSize() but they use the address (getAddress()) of the next function.
Does anyone have ever heard of a bug with this function or did I do something wrong?
Greeting...
2017 Apr 17
2
Possible stack corruption during call to JITSymbol::getAddress()
...I could be doing
>> something wrong here but stackoverflow didn't feel like the correct place
>> for this since there's so little there about LLVM ORC.
>>
>> Basically, I have a reproduction case (below) where if I throw an
>> exception before I call JITSymbol::getAddress() everything works properly
>> but throwing the same exception afterward will result in a SIGSEGV during
>> stack unwinding. This suggests to me that somehow the stack is getting
>> corrupted during the JITSymbol::getAddress() call.
>>
>> This problem was initially di...
2019 Jan 07
2
Kaleidoscope tutorial: extern functions failing
...actual error is occuring with the following code (on the cantFail line)
auto ExprSymbol = TheJIT->findSymbol("__anon_expr");
assert(ExprSymbol && "Function not found");
// cast to double-returning function
double (*FP)() = (double (*)())(intptr_t)cantFail(ExprSymbol.getAddress());
fprintf(stderr, "Evaluated to %f\n", FP());
and some investigation with GDB reveals that the hasError flag of
ExprSymbol.getAddress() is true, which is why the cantFail is failing. As
to why that flag is set, I'm at a loss. I have run through GDB with both
the sin and putchard ex...
2017 Apr 20
2
Possible stack corruption during call to JITSymbol::getAddress()
...ing wrong here but stackoverflow didn't feel like the correct place
>>>> for this since there's so little there about LLVM ORC.
>>>>
>>>> Basically, I have a reproduction case (below) where if I throw an
>>>> exception before I call JITSymbol::getAddress() everything works properly
>>>> but throwing the same exception afterward will result in a SIGSEGV during
>>>> stack unwinding. This suggests to me that somehow the stack is getting
>>>> corrupted during the JITSymbol::getAddress() call.
>>>>
>&g...
2017 Jul 27
2
llvm 5.0 release rc1 : ExecutionEngine fatal error on MCJIT::getFunctionAddress
...*uint64_t MCJIT::getSymbolAddress(const std::string &Name, bool
CheckFunctionsOnly) { std::string MangledName; { raw_string_ostream
MangledNameStream(MangledName);
Mangler::getNameWithPrefix(MangledNameStream, Name, getDataLayout()); }
return findSymbol(MangledName, CheckFunctionsOnly).getAddress();}*
Now with the current implementation (llvm 5.0 rc1 tag) :
*uint64_t MCJIT::getSymbolAddress(const std::string &Name, bool
CheckFunctionsOnly) { std::string MangledName; { raw_string_ostream
MangledNameStream(MangledName);
Mangler::getNameWithPrefix(MangledNameStream,...
2017 May 01
1
Possible stack corruption during call to JITSymbol::getAddress()
...didn't feel like the correct place
>>>>>> for this since there's so little there about LLVM ORC.
>>>>>>
>>>>>> Basically, I have a reproduction case (below) where if I throw an
>>>>>> exception before I call JITSymbol::getAddress() everything works properly
>>>>>> but throwing the same exception afterward will result in a SIGSEGV during
>>>>>> stack unwinding. This suggests to me that somehow the stack is getting
>>>>>> corrupted during the JITSymbol::getAddress() call....
2016 May 29
1
How to find variable names from LLVM IR?
...;
for (const_inst_iterator Iter = inst_begin(Func), End =
inst_end(Func); Iter != End; ++Iter)
{
if (const DbgDeclareInst* DbgDeclare =
dyn_cast<DbgDeclareInst>(&*Iter))
{
if (DbgDeclare->getAddress() == V) Var =
DbgDeclare->getVariable();
}
else if (const DbgValueInst* DbgValue =
dyn_cast<DbgValueInst>(&*Iter))
{
if (DbgValue->getValue() == V) Var =
DbgValue->getVariable();...
2016 Mar 24
1
[PATCH] D15965: Add support for dumping relocations in non-relocatable files
It sounds like what you’re asking is, rather that universally calling RelocationRef::getOffset inside llvm-objdump.cpp
I should:
* Check if Obj “isRelocatableObject”
* If it is, call RelocationRef::getOffset()
* If it isn’t
o Call RelocationRef::getAddress()
o Build an ordered map of all sections and their bounds, check if the relocation lands within a section
o Subtract the section address from the relocation address
Since getAddress isn’t in RelocationRef at the moment, this is going to have to be getAddress for MachO and COFF.
COFFOb...
2016 May 17
3
External function resolution: MCJIT vs ORC JIT
...pilation
if (orc) {
auto Resolver = llvm::orc::createLambdaResolver(
// External lookup functor
[&](const std::string &name) {
if (auto Sym = Compilelayer.findSymbol(name, true))
return llvm::RuntimeDyld::SymbolInfo(Sym.getAddress(), Sym.getFlags());
// If not found as a symbol, look up in current process.
// Why doesn't this work?
if (auto Addr = llvm::RTDyldMemoryManager::getSymbolAddressInProcess(name))
return llvm::RuntimeDyld::SymbolInfo(Addr, llvm:...
2019 Sep 19
3
"corrupted size vs. prev_size" when calling ExecutionSession::lookup()
...enerated IR code
llvm::cantFail(CompileLayer.add(ES.getMainJITDylib(),
llvm::orc::ThreadSafeModule(std::move(AST::takeModule()),
AST::takeContext())));
auto symbol = llvm::cantFail(ES.lookup({&ES.getMainJITDylib()},
Mangle("main")));
int (*entry)() = (decltype(entry)) symbol.getAddress();
std::cout << entry() << std::endl;
and the "corrupted size vs. prev_size" will happen if the IR code is this:
; ModuleID = 'top'
source_filename = "top"
@0 = global [3 x i32] [i32 1, i32 2, i32 3]
define i32 @main() {
%1 = alloca i32
store i32 0...
2015 Jun 26
2
[LLVMdev] ORC and relocations
...else {
uint64_t Addr = 0;
RTDyldSymbolTable::const_iterator Loc = GlobalSymbolTable.find(Name);
if (Loc == GlobalSymbolTable.end()) {
// This is an external symbol, try to get its address from the symbol
// resolver.
Addr = Resolver.findSymbol(Name.data()).getAddress();
// The call to getSymbolAddress may have caused additional modules to
// be loaded, which may have added new entries to the
// ExternalSymbolRelocations map. Consquently, we need to update our
// iterator. This is also why retrieval of the relocation list...
2006 Apr 30
4
Server IP
...like the application to grab the corresponding ip for that url.
Someone had previously suggested using @request.remote_ip, but that
obtains the ip from the requesting address, not the address of the url.
I''m thinking of using this method:
domain_name = @request.domain
ipaddr = IPSocket.getaddress( domain_name )
Is this my best bet?
--
Posted via http://www.ruby-forum.com/.
2019 Mar 22
2
MCJIT, can't use with math functions
...uccessfully finding the symbol:
Failure value returned from cantFail wrapped call
UNREACHABLE executed at
~/toolchain/install/llvm-8.0-x86-debug/include/llvm/Support/Error.h:732!
if (auto Sym = CompileLayer.findSymbol(MangledNameStream.str(),true))
{
void* fptr = (void *)cantFail(Sym.getAddress());
The last statement fails with the above message.
Has anything related to using MCJIT with math library functions changed
since LLVM 6.0?
Best,
Frank
2011 Jan 06
0
[LLVMdev] Null address pointer in llvm.dbg.declare
Hi,
I'm encountering a problem with llvm.dbg.declare. My code looks
basically like this:
if(DbgDeclareInst *dbg = dyn_cast<DbgDeclareInst>(&inst)) {
const Value* addr = dbg->getAddress();
const MDNode* mvar = dbg->getVariable();
...
}
While the MDNode (mvar) contains the correct information (name of the
variable, etc...), getAddress always returns NULL. Am I missing
something, or is there some other way to access the variable being
declared?
NB: this happens when pr...
2015 Jun 30
2
[LLVMdev] ORC and relocations
...else {
uint64_t Addr = 0;
RTDyldSymbolTable::const_iterator Loc = GlobalSymbolTable.find(Name);
if (Loc == GlobalSymbolTable.end()) {
// This is an external symbol, try to get its address from the symbol
// resolver.
Addr = Resolver.findSymbol(Name.data()).getAddress();
// The call to getSymbolAddress may have caused additional modules to
// be loaded, which may have added new entries to the
// ExternalSymbolRelocations map. Consquently, we need to update our
// iterator. This is also why retrieval of the relocation list...
2015 Aug 13
4
Linking existing functions from JITed code
...ing related
function to my JIT context, and I create a lambda resolver as such:
JITContext::addModule(…) {
auto Resolver = createLambdaResolver(
[&](const std::string &name) {
// look up first in JIT'ed code
if (auto sym = findMangledSymbol(name)) {
return RuntimeDyld::SymbolInfo(sym.getAddress(),
sym.getFlags());
return RuntimeDyld::SymbolInfo(nullptr);
}
// look up in added globals
if (auto addr = getPointerToGlobalMapping(name)) {
return RuntimeDyld::SymbolInfo(addr, JITSymbolFlags::Exported);
}
// finally try to look up existing process symbols, note
// this works for symbols loaded...
2015 Jul 27
15
[LLVMdev] Help with using LLVM to re-compile hot functions at run-time
Hi Again,
I'm a little confused regarding what is the exact Orc's functions I should
use
in order to save the functions code in a code cache so it could be later
replaced with different versions of it and I appreciate your help.
Just a reminder I want to dynamically recompile the program based on
profile
collected at the run-time. I would like to start executing the program
from
the
2010 Feb 24
1
Sketchup 7 and proxy settings.
Hi everyone,
I've got stuck trying to get Sketchup 7 ( Version 7.1.6860 ) to connect to the 3D warehouse via a proxy using Wine 1.1.38 (same problem with older version 1.1.35) on a linux machine ( Gentoo, Kernel 2.6.32.3 )
I have followed the instructions for setting up a proxy for Wine from:
http://wiki.winehq.org/FAQ#head-d582e2a4e92f4d8ae6c3401daebd7d5621eb220f
######
My
2016 May 19
2
External function resolution: MCJIT vs ORC JIT
...gt; auto Resolver = llvm::orc::createLambdaResolver(
> // External lookup functor
> [&](const std::string &name) {
> if (auto Sym = Compilelayer.findSymbol(name, true))
> return llvm::RuntimeDyld::SymbolInfo(Sym.getAddress(), Sym.getFlags());
> // If not found as a symbol, look up in current process.
> // Why doesn't this work?
> if (auto Addr = llvm::RTDyldMemoryManager::getSymbolAddressInProcess(name))
> return llvm::RuntimeDyld::Sy...