Skip to content

Commit fefe379

Browse files
authored
binaryplatforms.jl: Don't close library opened with RTLD_NOLOAD (#57831)
"Passing this handle to FreeLibrary can cause a module to be unloaded prematurely." Also crashes in Wine.
2 parents bbb0596 + 1ebaea3 commit fefe379

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

base/binaryplatforms.jl

-2
Original file line numberDiff line numberDiff line change
@@ -931,12 +931,10 @@ function detect_libstdcxx_version(max_minor_version::Int=30)
931931
# https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html
932932
for minor_version in max_minor_version:-1:18
933933
if Libdl.dlsym(libstdcxx, "GLIBCXX_3.4.$(minor_version)"; throw_error=false) !== nothing
934-
Libdl.dlclose(libstdcxx)
935934
return VersionNumber("3.4.$(minor_version)")
936935
end
937936
end
938937
end
939-
Libdl.dlclose(libstdcxx)
940938
return nothing
941939
end
942940

0 commit comments

Comments
 (0)