Cuda code runs at 7.5 but not in 6.5

Hi people, i have a code that runs perfectly in my notebook with a GeForce 820M CC 2.1 and CUDA 7.5 but gives me a SegFault when i try to run it in my college lab computer with a GTX 680 CC 3.0 and CUDA 6.5. First it was stuck in a

cudaMemcpyToSymbol(d_problem, problem, sizeof(problem_t))

call but i fixed it by adding a extra argument, the strangest thing is that my SegFault occurs at a simple part of the code in the beginning of my kernel function:

double* trail = (double*) malloc(d_problem.max_colors * d_problem.nof_vertices * sizeof(double));
int *size_color = (int*) malloc(d_problem.max_colors * sizeof(int));

for (i = 0; i < d_problem.max_colors; i++) {
    size_color[i] = 0;
    for (j = 0; j < d_problem.nof_vertices; j++) {
        trail[i * d_problem.nof_vertices + j] = 0;

I get SegFault at line 7.

The error happens only in the GTX 680 with CUDA 6.5 and the exactly same code runs in my GeForce 820M with CUDA 7.5 this is really confusing me… i’m clueless about what is the problem. There’re a lot of changes between the 6.5 and 7.5? Thanks for helping!

I update the Toolkit of the computer and now both of them runs CUDA 7.5 but the exactly same error still happens only in the GTX 680 one, also i checked what is the error in cuda-gdb (with memcheck), the error is CUDA_EXCEPTION_1 : “Lane Illegal Address”. The same code runs perfectly in my notebook with GeForce 820M. What is happening?!