Calling SetCurrentDirectory during MFXEnumImplementations is unsafe
jeremy-visionaid opened this issue · 3 comments
jeremy-visionaid commented
MFXEnumImplementations calls SetCurrentDirectory through LoaderCtxVPL::SearchDirForLibs:
https://github.com/oneapi-src/oneVPL/blob/e12ace9761bb52786409e830f619916b86e87fc5/dispatcher/vpl/mfx_dispatcher_vpl_loader.cpp#L174
Unfortunately, SetCurrentDirectory affects the entire processes, causing other threads to fail if they expect the current directory to remain unchanged. i.e. it's not OK for a library to call this function since it's not reasonable to assume no other threads are running.
jonrecker commented
Thank you. This call will be removed in the next release.
jeremy-visionaid commented
That's great, thanks for the quick response!