cuda-memcheck is a tool for checking the device code running on the GPU. The error message shown above looks like it is coming from glibc, and thus indicates a problem with your host code running on the CPU. Try valgrind to track down memory corruption in host code.
Thanks for your post.
I have tried the valgrind before cuda-memcheck, but I found it often reports wrong alerts in cuda code. So I tried the cuda-memcheck for debugging. What makes me curious is my code crashed in normal running way but it works very well in the cuda-memcheck model!