level-zero-tests icon indicating copy to clipboard operation
level-zero-tests copied to clipboard

Data race in level_zero_tests::get_default_context()

Open Alexandr-Konovalov opened this issue 2 years ago • 0 comments

Dear colleagues,

There is a data race between ze_context_handle_t::context checking and its initialization in level_zero_tests::get_default_context(). The context may be unsuccessfully checked in the condition by several threads and then assigned simultaneously as well. Multithread initialization is expected in for example, zeImmediateCommandListMultiTthreadTest::GivenMultipleThreadsWhenCreateCloseAndDestroyImmediateCommandListsThenReturnSuccess.

Same issue affects the code below.

Alexandr-Konovalov avatar Feb 22 '23 09:02 Alexandr-Konovalov