Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 14 by
presenti...@gmail.com: call instr not working.
http://code.google.com/p/jitasm/issues/detail?id=14
I modified the sample tutorial1.cpp file as follows :-
#include "stdio.h"
#include "jitasm.h"
using namespace jitasm;
void foo(){
printf("INSIDE FOO");
}
Addr addr1 = Addr(RegID::Invalid(), (size_t)&foo);
struct tutorial1 : jitasm::function<uint64, tutorial1>
{
Reg a;
Result main()
{
mov(a, qword_ptr[addr1]);
call(a);
return a;
}
};
int main()
{
// Make function instance
tutorial1 f;
// Runtime code genaration and run
int result = f();
printf("Result : %d\n", result);
return 0;
}
After compiling above code & running it, I am getting "Segmentation fault".
Am I doing something wrong here ?
FYI, I am using the latest release of jitasm (0.7.1).
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings