Closed rtibdewal closed 11 years ago
The #if is there just because it will never be 64-bit on ARM.
Sorry about the mess.. but I was not able to understand the bug better. Next time I will take care and will do through testing before approaching to anybody with bug.
Real bug is we cannot inject in 32 bit process. Usually all apple applications process on OSX 10.6 onwards are 64 bit but if you try with third party applications like google chrome, skype, VMWare fussion or any other 32 bit process, injection does not work.
We need 32bit libs for 32bit processes, and 64bit libs for 64bit processes. My bad.
But I did had to change following line
bool proc64 = info.all_image_info_addr > 0;
with the code I had submitted in pull request.
Hello there,
In file, Inject.c
static kern_return_t get_stuff(task_t task, cpu_type_t cputype, struct addr_bundle addrs) {
...
if defined(i386) || defined(x86_64) || defined(ppc)
else
endif
...
}
Above code gives wrong result and thus injection fails at mach_vm_read_overwrite();
I think check for #if defined(i386) || defined(x86_64) || defined(ppc) is wrong as it will check whether injection process is 64 bit or 32 bit or ppc. It wont check whether task(injectee process) is 32 bit or 64 bit.