On Linux moving 32 bit program to 64 bit: 3 segmentation faults for invalid memory references (malloc?)

I’m guessing you meant integer(c_int). c_ptr is not a valid kind value for integer.