Exception 'cudaError_enum' thrown in cudaGetExportTable (CUDA runtime library)?
===

I am debugging a MPI-based CUDA program with DDT.  My code aborts when the CUDA runtime library (libcudart) throws an exception in the (undocumented) function `cudaGetExportTable`, when called from `cudaMalloc` and `cudaThreadSynchronize` in my code.

Why is libcudart throwing an exception (I am using the C API, not the C++ API) before I can detect it in my code with its `cudaError_t` return value or with `CHECKCUDAERROR`?

(I'm using CUDA 4.2 SDK for Linux.)

Output:

    Process 9: terminate called after throwing an instance of 'cudaError_enum'
    Process 9: terminate called recursively

My code:

    cudaThreadSynchronize();
    CHECKCUDAERROR("cudaThreadSynchronize()");

Partial Backtrace:

    cudaThreadSynchronize()
    -> cudaGetExportTable()
       -> cudaGetExportTable()
          -> __cxa_throw

