No matter what the program is, valgrind gives nearly the same output :
Illegal Instruction (core dumped).
Even in this underlying program it shows the same
#include<stdio.h>
void fun(int *i)
{
printf(" %d \n",*i);
}
int main()
{
int j=90;
fun(&j);
return 0;
}
Your valgrind is broken, or is not compatible with your C library.
To confirm this, first see if you can run the valgrind binary at all:
valgrind --help
(if that fails, maybe the binary is corrupt or is for a different architecture)
Then try within something you didn't write:
valgrind /bin/true
(if that fails, perhaps it's not compatible with your C library)
Assuming one or more of those fails, you will need to reinstall valgrind and try again.