ESP pointer bug (CUDA 2.1) This is bug 459151

Hi, i want to port my code from CUDA 1.1 to CUDA 2.1, but have a problem with ESP pointer (see attachment).
When i was trying to port code to CUDA 2.0 i have the same problem two or three mounth ago.
In this topik i 've been told that this is a bug and it will be fixed in next CUDA versions.
[url=“http://forums.nvidia.com/index.php?showtopic=75866&hl=”]http://forums.nvidia.com/index.php?showtopic=75866&hl=[/url]
Nothing changes!

I just want to make my code works on CUDA 2.1.
May be there is some reasons for that bug and i can change my code to fix this bug?

Thanks.

Up. External Image

Up

I think the bug report is clear. A function pointer indirection is causing the problem. THe function pointer is declared to be of one type AND the function it is actually pointing to is of another type resulting in extra pops (usually arguments) corrupting the ESP value…

I think you should go check your code for such bugs…

Possible that such errors were not visible in 1.1 and currently stand exposed with 2.0 and 2.1

it fails on entry in

static void __sti____cudaRegisterAll_13_rtlib_cpp1_ii_hrt(void)

that was generated by nvcc. And in my host code i never use function pointers.

And, could it be my error in host code or what is it?

Sorry me for flood, but i am not quite clear about this error. What i should do and if this is a nvcc bug, and it doen’t reproduce in outher projects, i think that i can send code that cause this problem.

Apparently the cause of 459151 is that you’re using a different CUDART version when you run the app versus when you compiled it. Make sure the two copies of cudart.dll are identical.

Tanks a lot!!! I have found that the system32 folder contain old cudart.dll I changed it to new cudart.dll and all works correct. Thanks again! External Media

sorry I didn’t look at 459151 when you first posted this :P

no problem, the is no error anymore, and thanks one more time :)