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
However, it should be noted that this operation does not actually return a handle to the process, but to libjulia-internal (JuliaLang/julia#49010 (comment)). Opening an issue to see if this is intended, and if so, maybe the comment should be updated.
The text was updated successfully, but these errors were encountered:
Good catch! The purpose of the dlopen(NULL) is to have a handle for calling dlsym to find symbols in the global/process symbol table (as described by the POSIX dlopen documentation) that are not found in an explicitly chosen library opened with dlopen("..."). It appears that the only current reliance on dlopen(NULL) in CBinding is to enable meaningful warning messages.
However, this leads to the question of how to correctly determine if a symbol is capable of being referenced with ccall or cglobal. The case of determining at load-time that an emitted ccall((:function, "library"), ...) will fail using dlopen+dlsym is clear, but how should a ccall(:function, ...) be checked? Again, this is not a critical feature as it is just to provide load-time warnings of the potential for errors at run-time, but it is an important diagnostic aid.
this leads to the question of how to correctly determine if a symbol is capable of being referenced with ccall or cglobal. The case of determining at load-time that an emitted ccall((:function, "library"), ...) will fail using dlopen+dlsym is clear, but how should a ccall(:function, ...) be checked?
Maybe @topolarity has some thoughts, as he recently worked on that code.
The CBinding.jl code contains the following:
CBinding.jl/src/context.jl
Lines 242 to 244 in 38e76e5
CBinding.jl/src/context.jl
Lines 293 to 294 in 38e76e5
This broke on 1.10, but PkgEval spotted it and it will soon be fixed, see JuliaLang/julia#49010 (comment) and JuliaLang/julia#49611
However, it should be noted that this operation does not actually return a handle to the process, but to libjulia-internal (JuliaLang/julia#49010 (comment)). Opening an issue to see if this is intended, and if so, maybe the comment should be updated.
The text was updated successfully, but these errors were encountered: