Libcuda throwing "pure virtual method" error

I am getting the following intermittent error in my program :

Stack trace:

stack trace:
  ./ : ()+0x96e2d
  /lib64/ : ()+0x27bb18
  /lib64/ : ()+0x298168
  /lib64/ : ()+0x8b12d
  /lib64/ : ()+0x10cbc0
terminate called after throwing an instance of 'std::runtime_error'
  what():  pure virtual function called

Someone was naughty and put a virtual method call in a constructor/destructor

such problems can also be the result of stack corruption in your program, prior to the call into libcuda.

Thanks. I am getting the stack trace by implementing the C++ runtime method

extern "C" void __cxa_pure_virtual() {

so I think it’s unlikely that the error is due to stack corruption.

Bug submitted

@Robert_Crovella this was my bad :) It’s an interesting situation - due to race condition, CUDA callback was accessing an object that was in the process of being destroyed. As destructors are called from derived up to base, a base pure virtual method was called during the race condition, triggering that error.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.