Abort (core dumped) when calling cudaGetDevice

I’m running CUDA 3.2 on Fedora 14. I call my CUDA code through a mex-layer in Matlab 2010a. A couple of weeks ago I switched to CUDA 3.2 and Fedora 14 from CUDA 3.0 and Fedora 12, recompiled my code and after that I got a Abort (core dumped) as soon as I tried to run any of my mex files calling CUDA. After some time of trial and error I found two problems. If I included -lcufft when compiling then all mex files would give the same error. If removing -lcufft everything was ok until a tried to run some code utilizing cudaGetDevice. If removing those lines calling cudaGetDevice then everything is ok.

When running with gdb, this is the only thing I get as output:
Program received signal SIGUSR1, User defined signal 1.
0x000000372980b3b4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
(gdb) c
Continuing.

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffe5ca9700 (LWP 17372)]
0x0000003728c330c5 in raise () from /lib64/libc.so.6
(gdb) c
Continuing.

Program received signal SIGABRT, Aborted.
0x0000003728c330c5 in raise () from /lib64/libc.so.6
(gdb) c
Continuing.
[Thread 0x7fffcbac6700 (LWP 17766) exited]
[Thread 0x7fffcc2c7700 (LWP 17765) exited]
[Thread 0x7fffccac8700 (LWP 17764) exited]
[Thread 0x7fffd67fb700 (LWP 17378) exited]
[Thread 0x7fffd6bfc700 (LWP 17377) exited]
[Thread 0x7fffd6ffd700 (LWP 17376) exited]
[Thread 0x7fffe54a8700 (LWP 17373) exited]
[Thread 0x7fffe5ca9700 (LWP 17372) exited]
[Thread 0x7fffe64aa700 (LWP 17371) exited]
[Thread 0x7fffd7fff700 (LWP 17374) exited]

Any suggestions to why this happens?

Thanks,
Daniel