clvk icon indicating copy to clipboard operation
clvk copied to clipboard

Crash with global objects that use OpenCL functions in their destructors

Open bmanga opened this issue 1 year ago • 0 comments

Hi,

From my understanding the clvk global state is initialized on first demand, and it's destruction happens by registering a function to atexit.

The problem arises where you have other libraries that have global objects that use OpenCL functions (eg clReleaseProgram in clblast) in their destructors. By then, all the atexit entries have been processed and the clvk state is already destroyed, leading to a segmentation fault.

The code in PR #530 fixes the issue for me

bmanga avatar May 17 '23 13:05 bmanga