search for: exec_engine

Displaying 9 results from an estimated 9 matches for "exec_engine".

2018 Jun 14
3
runStaticConstructorsDestructors() causes crash on exit
Greetings, LLVM wizards. I am using clang to compile a C++ module, and an ExecutionEngine (MCJIT) to execute a function it defines. That works (or pretends to). However, if I call the module's constructors first: exec_engine->runStaticConstructorsDestructors(false); exec_engine->runFunctionAsMain(function, argvec, NULL); execution still works, but my program crashes when it exits, in __run_exit_handlers(). I can't tell from gdb what exit handler is crashing, but no calls are made to atexit() or on_exit(); al...
2018 Jun 19
2
runStaticConstructorsDestructors() causes crash on exit
...g> wrote: > > > > Greetings, LLVM wizards. > > > > I am using clang to compile a C++ module, and an ExecutionEngine (MCJIT) > to execute a function it defines. That works (or pretends to). However, if > I call the module's constructors first: > > > > exec_engine->runStaticConstructorsDestructors(false); > > exec_engine->runFunctionAsMain(function, argvec, NULL); > > > > execution still works, but my program crashes when it exits, in > __run_exit_handlers(). I can't tell from gdb what exit handler is crashing, > but no call...
2011 Mar 14
2
[LLVMdev] How to load a data from the address of unsiged long type
...ONST(0xc0008000); a = new BitCastInst(a, PointerType::get(XgetType(Int32Ty), 0), "", bb); Value* data = new LoadInst(addr, "", false, bb); Error: Bitcast requires types of same width 3. Code: Type const *intptr_type = cpu->dyncom_engine->exec_engine->getTargetData()->getIntPtrType(_CTX()); Value* ptr = new IntToPtrInst(a, intptr_type, "", bb); Value* data = new LoadInst(ptr, "", false, bb); Error: Segmentation fault Any person can give me some hints for my case? Thanks MK -- www.skyeye....
2011 Mar 26
2
[LLVMdev] How to read memory data througn adress of unsigned long
...##################### Value* data = new LoadInst(addr, "", false, bb); encounter segmentation fault. ######################## I also try to use IntToPtrInstr to do some transform as the following: ################################ Type const *intptr_type = cpu->dyncom_engine->exec_engine->getTargetData()->getIntPtrType(_CTX()); Value* ptr = new IntToPtrInst(v, intptr_type, "", bb); Value* data = new LoadInst(ptr, "", false, bb); ######################################## still encounter segmentation fault Any person can give me some hints fo...
2018 Jun 21
2
runStaticConstructorsDestructors() causes crash on exit
...t; > > Greetings, LLVM wizards. > > > > > > I am using clang to compile a C++ module, and an ExecutionEngine > (MCJIT) to execute a function it defines. That works (or pretends to). > However, if I call the module's constructors first: > > > > > > exec_engine->runStaticConstructorsDestructors(false); > > > exec_engine->runFunctionAsMain(function, argvec, NULL); > > > > > > execution still works, but my program crashes when it exits, in > __run_exit_handlers(). I can't tell from gdb what exit handler is crashing, &...
2018 Jun 25
2
runStaticConstructorsDestructors() causes crash on exit
...gs, LLVM wizards. > > > > > > > > I am using clang to compile a C++ module, and an ExecutionEngine > (MCJIT) to execute a function it defines. That works (or pretends to). > However, if I call the module's constructors first: > > > > > > > > exec_engine->runStaticConstructorsDestructors(false); > > > > exec_engine->runFunctionAsMain(function, argvec, NULL); > > > > > > > > execution still works, but my program crashes when it exits, in > __run_exit_handlers(). I can't tell from gdb what exit handler...
2011 Oct 24
1
[LLVMdev] if llvm can translate and generate the function in parallel with multithread
...ate and generate the native code in parallel with multi-thread. But some various bugs will be triggered. We run the following code in multithread environment: ################## BasicBlock::Create(_CTX(), "dispatch", cpu->cur_func, 0); BranchInst::Create(bb_start, label_entry); cpu->exec_engine->getPointerToFunction ##################3 And cpu variable is stored for every thread. Thanks MK -- www.skyeye.org
2011 Mar 14
0
[LLVMdev] How to load a data from the address of unsiged long type
...BitCastInst(a, PointerType::get(XgetType(Int32Ty), 0), "", bb); > Value* data = new LoadInst(addr, "", false, bb); > Error: > Bitcast requires types of same width > 3. Code: > Type const *intptr_type = > cpu->dyncom_engine->exec_engine->getTargetData()->getIntPtrType(_CTX()); > Value* ptr = new IntToPtrInst(a, intptr_type, "", bb); > Value* data = new LoadInst(ptr, "", false, bb); > Error: > Segmentation fault > > > Any person can give me some hints for...
2011 Mar 26
0
[LLVMdev] How to read memory data througn adress of unsigned long
...a segfault. Here you're trying to load from an integer without first casting it to a pointer, which you do next. > I also try to use IntToPtrInstr to do some transform as the following: > ################################ >      Type const *intptr_type = > cpu->dyncom_engine->exec_engine->getTargetData()->getIntPtrType(_CTX()); >       Value* ptr = new IntToPtrInst(v, intptr_type, "", bb); >       Value* data = new LoadInst(ptr, "", false, bb); >  ######################################## >  still encounter segmentation fault > > Any perso...