I am debugging a Windows heap corruption error in a program that involves a mix of .cpp and .cu files. To address this, I am attempting to use the Address Sanitizer in Visual Studio. However, I encounter an issue when a CUDA API call, such as cudaMallocHost, is present in a .cpp file. This results in an access violation due to the inability to allocate pinned memory. Conversely, if the program is implemented solely with .cu files, it runs smoothly. Unfortunately, compiling all files with nvcc is not feasible because many components of the program are implemented in C++20, and I am currently using CUDA 11.4. Is there a workaround to mitigate this issue?
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Is pinned memory possible in mixed cpp and cuda | 3 | 2914 | January 29, 2009 | |
| Access violations when using CUDA3.0 with VC++2008 | 2 | 3057 | December 1, 2010 | |
| Unable to Allocate on Memory and Stack Overflow | 11 | 2650 | September 6, 2011 | |
| Runtime error when I add .cu file to VS2008 C++ project I cannot get past this error, even after Goo | 3 | 15853 | September 1, 2011 | |
| Heap Corruption help needed! | 1 | 8245 | April 16, 2009 | |
| CudaHostAlloc throwing an exception | 1 | 780 | February 16, 2014 | |
| _CrtIsValidHeapPointer | 12 | 13451 | July 6, 2009 | |
| CUDA_ERROR_ILLEGAL_ADDRESS | 6 | 11495 | September 26, 2017 | |
| NVCC forces c++ compilation of .cu files | 11 | 26040 | December 11, 2011 | |
| Memory Access Problem | 1 | 1848 | July 21, 2010 |