For debugging: What happens if you roll your own memcpy?
Code: Select all
for (i=0;i<len;i++)
dst[i] = src[i];
What /could/ be happening is that one of your pointers is not accessible. If you make it a separate function, prevent inlining and disable a bit of optimization you can step into the function and see the function's arguments.