-
-
Notifications
You must be signed in to change notification settings - Fork 62
Closed
Description
Investigating cache configuration, it seems that we have a potential data race about accessing/initializing m_direntLookup
.
This data race is in FileImpl::direntLookup()
method : https://github.com/openzim/libzim/blob/main/src/fileimpl.cpp#L277-L293
The field m_direntLookup
(std::unique_ptr
) is accessed from different threads and std::unique_ptr
is not thread safe. (https://learn.microsoft.com/en-us/cpp/standard-library/thread-safety-in-the-cpp-standard-library?view=msvc-170)
The lock we have only avoid us to create the dirent lookup twice but it doesn't prevent us to read and write m_direntLookup
in the same time.
Metadata
Metadata
Assignees
Labels
No labels