The order of parameters in kernel function

Hi all, I got a problem when I run my code on Intel i7 CPU.
The library I used is AMD APP.

First all, the code works fine on my AMD GPU.

But when I run it on CPU, I got segment fault when I access the memory object in the kernel function. The problem is very weird.

if my kernel function is like this: kernel(int variable, __global buffer), I got segment fault when I access buffer.

But if I exchange the order of parameters: kernel(__global buffer, int variable), it works fine.

In addition, if I add one more int variable before buffer: kernel(int var, int var, __global buffer), it also works.

So I am wondering whether some alignement problem is incurred when I run the code on CPU. By the way, my CPU is 64bit.