You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if _sclOpenICDLoader returns NULL, we still pass the result to _sclGetFunctionAddress. This happens to be handled gracefully in glibc, where RTLD_DEFAULT is NULL, but that's not guaranteed. As far as I can tell, Windows's behavior when NULL is passed to GetProcAddress is more or less identical, but completely undocumented. We shouldn't rely on this.
This could actually lead to infinite recursion depending on linker configuration, since we could end up loading and calling into our own copy of clGetPlatformIDs if we do an RTLD_DEFAULT search. If we get NULL back from _sclOpenICDLoader (or _sclGetICDLoaderHandle, after #18), we should error out immediately.
The text was updated successfully, but these errors were encountered:
Currently, if
_sclOpenICDLoader
returns NULL, we still pass the result to_sclGetFunctionAddress
. This happens to be handled gracefully in glibc, whereRTLD_DEFAULT
isNULL
, but that's not guaranteed. As far as I can tell, Windows's behavior whenNULL
is passed toGetProcAddress
is more or less identical, but completely undocumented. We shouldn't rely on this.This could actually lead to infinite recursion depending on linker configuration, since we could end up loading and calling into our own copy of
clGetPlatformIDs
if we do anRTLD_DEFAULT
search. If we get NULL back from_sclOpenICDLoader
(or_sclGetICDLoaderHandle
, after #18), we should error out immediately.The text was updated successfully, but these errors were encountered: