From 3dcc8e0046e959ad90360520890f3ccf3cf21cfa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Jun 2021 18:08:31 -0600 Subject: [PATCH] chore: bump libloading from 0.6.2 to 0.7.0 (#17704) * chore: bump libloading from 0.6.2 to 0.7.0 Bumps [libloading](https://github.com/nagisa/rust_libloading) from 0.6.2 to 0.7.0. - [Release notes](https://github.com/nagisa/rust_libloading/releases) - [Commits](https://github.com/nagisa/rust_libloading/compare/0.6.2...0.7.0) --- updated-dependencies: - dependency-name: libloading dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * [auto-commit] Update all Cargo lock files * New libloading methods are marked unsafe Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot-buildkite Co-authored-by: Tyera Eulberg --- Cargo.lock | 13 ++----------- programs/bpf/Cargo.lock | 5 +++-- runtime/Cargo.toml | 2 +- runtime/src/native_loader.rs | 8 +++++--- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 49ad0e1e77..e7725dc38d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -602,7 +602,7 @@ checksum = "853eda514c284c2287f4bf20ae614f8781f40a81d32ecda6e91449304dfe077c" dependencies = [ "glob", "libc", - "libloading 0.7.0", + "libloading", ] [[package]] @@ -2227,15 +2227,6 @@ version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1482821306169ec4d07f6aca392a4681f66c75c9918aa49641a2595db64053cb" -[[package]] -name = "libloading" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cadb8e769f070c45df05c78c7520eb4cd17061d4ab262e43cfc68b4d00ac71c" -dependencies = [ - "winapi 0.3.8", -] - [[package]] name = "libloading" version = "0.7.0" @@ -5261,7 +5252,7 @@ dependencies = [ "itertools", "lazy_static", "libc", - "libloading 0.6.2", + "libloading", "log 0.4.11", "memmap2 0.2.3", "num-derive", diff --git a/programs/bpf/Cargo.lock b/programs/bpf/Cargo.lock index 055dbfdb0e..b91c306fe6 100644 --- a/programs/bpf/Cargo.lock +++ b/programs/bpf/Cargo.lock @@ -1504,10 +1504,11 @@ checksum = "1482821306169ec4d07f6aca392a4681f66c75c9918aa49641a2595db64053cb" [[package]] name = "libloading" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cadb8e769f070c45df05c78c7520eb4cd17061d4ab262e43cfc68b4d00ac71c" +checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" dependencies = [ + "cfg-if 1.0.0", "winapi 0.3.8", ] diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 94630b270c..75cc9b4cbf 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -24,7 +24,7 @@ fnv = "1.0.7" itertools = "0.9.0" lazy_static = "1.4.0" libc = "0.2.81" -libloading = "0.6.2" +libloading = "0.7.0" log = "0.4.11" memmap2 = "0.2.3" num-derive = { version = "0.3" } diff --git a/runtime/src/native_loader.rs b/runtime/src/native_loader.rs index 0e51a0f8ba..149770b181 100644 --- a/runtime/src/native_loader.rs +++ b/runtime/src/native_loader.rs @@ -93,13 +93,15 @@ impl NativeLoader { #[cfg(windows)] fn library_open(path: &Path) -> Result { - Library::new(path) + unsafe { Library::new(path) } } #[cfg(not(windows))] fn library_open(path: &Path) -> Result { - // Linux tls bug can cause crash on dlclose(), workaround by never unloading - Library::open(Some(path), libc::RTLD_NODELETE | libc::RTLD_NOW) + unsafe { + // Linux tls bug can cause crash on dlclose(), workaround by never unloading + Library::open(Some(path), libc::RTLD_NODELETE | libc::RTLD_NOW) + } } fn get_entrypoint(