Scenario:
1. Allocate N buffers, 1 GB each
2. Schedule a kernel call for each of the N buffers
3. Call clFlush
4. Call clSynchronize
5. Call clReleaseMemObject for each of the created buffers
If N is chosen slightly above the amount of Dedicated + Shared GPU in GB on Windows, then all calls return no errors, however, one of the clReleaseMemObject calls causes a crash in amdocl64.dll. For example:
Exception thrown at 0x00007FF941C96BBA (amdocl64.dll) in test.exe: 0xC0000005: Access violation reading location 0x0000000000000000
For example, on my computer with 128 GB RAM and AMD RX 7900 XTX with 24 GB VRAM the test code crashes with N = 90.