I tried to generate a cuda coredump to debug my code.
I set CUDA_ENABLE_COREDUMP_ON_EXCEPTION to 1 and test with two code snippets.
The first one can get coredump file as expected. This sample use a dereference on a null pointer to generate coredump: global void k(int *d){
int *x = NULL;
*d = *x;
}
The second one cannot get coredump file. This sammple produced a accessing array out of bound error: global void k(int *d){
*(d+0x10000000) = 1;
}
I guess the second one produced just a runtime error but not a exception so no coredump file generated?
Any comments are appreciated. Many thanks!
@AKravets ,Thanks for your quick reply.
I didnt use cuda-gdb.
I used “cuda-memcheck my_test_app” to get the core file.
I think your reply make sense.
If that, perhaps low level mmu mechanism of QNX makes coredump file not generated for my sacond case.