First call to cudaMalloc returns invalid pointer

Hi All

I’m seeing some odd behavior currently for my CUDA code.

The code I was using was running as intended using the new 4.0 RC driver. I had some odd issues, so I tried to install the latest 3.2 driver, win7_64_263.06. After this, my kernel crashed with no explanation.

Further investigation showed me that my first call to cudaMalloc would return cudaSuccess, but the pointer value would be zero, causing the kernels to fail (Is there a null-buffer check in there?)

Now, if I start by simply allocating a small amount of memory (4096 bytes), my code runs smooth afterwards.

Is this a known bug? I can see it pop up here and there, and I don’t get it for the new driver, so somebody must have noticed it.

/Henrik