NVML.dll crashes when using the Application Verifier

I’ve been trying to use the Application Verifier (from the Windows SDK) on an application that includes NVML (on Windows) and calls into nvmlDeviceGetMemoryInfo_v2. The app appears to run fine normally, but when AppVerif is enabled in certain modes then it causes the nvml.dll to fail some of the checks.

I’ve got my test code down to the following bare bones which causes the issue:

int main()
{
nvmlInit();
nvmlDevice_t m_device;
nvmlDeviceGetHandleByIndex(0/* device index*/, &m_device);

nvmlMemory_v2_t mem = {};
mem.version = nvmlMemory_v2;
nvmlDeviceGetMemoryInfo_v2(m_device, &mem);
printf("GPU mem free=%I64u used=%I64u total=%I64u\n", mem.free, mem.used, mem.total);

}

In the Application Verifier, if the tests for “Handles” and “Heaps” are enabled under “Basics” (you can disable all others), this causes nvml.dll to throw an access violation which is indication that a problem has been found.

Can someone verify what’s going on? I’ve been seeing this for a long time and haven’t got to filing a bug until now, I’m on the latest Windows 11 Insider builds and using NVML with a version of 8.17.15.2686

Cheers

-roger