Segfault when running GPU Computing SDK examples

Hi,

I installed the latest developer drivers (195.36.15) for my 8600M GT NVIDIA card, the toolkit for ubuntu (I am using Kubuntu 10.04) and the latest GPU Computing SDK. I managed to compile all the examples using gcc 4.4.3. The problem is that when I try to run an example, I get a segmentation fault. Here’s what I get in gdb when I try to run deviceQuery:

codebox run

Starting program: /home/frounk/NVIDIA_GPU_Computing_SDK/C/bin/linux/debug/deviceQuery

[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.

0x000000000041c4a0 in strlen ()

(gdb) bt

#0 0x000000000041c4a0 in strlen ()

#1 0x0000000000403a49 in shrSetLogFileName (cOverRideName=0x4128a2 “deviceQuery.txt”) at src/shrUtils.cpp:193

#2 0x0000000000402f28 in main (argc=1, argv=0x7fffffffe228) at deviceQuery.cpp:29

(gdb) up

#1 0x0000000000403a49 in shrSetLogFileName (cOverRideName=0x4128a2 “deviceQuery.txt”) at src/shrUtils.cpp:193

193 cLogFilePathAndName = (char*) malloc(strlen(cOverRideName) + 1);

(gdb) list

188 void shrSetLogFileName (const char* cOverRideName)

189 {

190 if( cLogFilePathAndName != NULL ) {

191 free(cLogFilePathAndName);

192 }

193 cLogFilePathAndName = (char*) malloc(strlen(cOverRideName) + 1);

194 #ifdef WIN32

195 strcpy_s(cLogFilePathAndName, strlen(cOverRideName) + 1, cOverRideName);

196 #else

197 strcpy(cLogFilePathAndName, cOverRideName);

(gdb) up

#2 0x0000000000402f28 in main (argc=1, argv=0x7fffffffe228) at deviceQuery.cpp:29

29 shrSetLogFileName (“deviceQuery.txt”);

(gdb) list

24 // Program main

25 ////////////////////////////////////////////////////////////////////////////////

26 int

27 main( int argc, const char** argv)

28 {

29 shrSetLogFileName (“deviceQuery.txt”);

30 shrLog(“%s Starting…\n\n”, argv[0]);

31 shrLog(" CUDA Device Query (Runtime API) version (CUDART static linking)\n\n");

32

33 int deviceCount = 0;

(gdb) down

#1 0x0000000000403a49 in shrSetLogFileName (cOverRideName=0x4128a2 “deviceQuery.txt”) at src/shrUtils.cpp:193

193 cLogFilePathAndName = (char*) malloc(strlen(cOverRideName) + 1);

(gdb) p cOverRideName

$1 = 0x4128a2 “deviceQuery.txt”[/codebox]

It seems to crash in strlen, but I really doubt the problem is with the call to strlen and cOverRideName seems to be a valid string. I have the latest drivers installed and I can’t seem to find what is causing the crash. Has anyone else encountered this problem (and hopefully solved it!)?

Thank you