From 18584e2259382bbb4e56007eacbe81dba25db05a Mon Sep 17 00:00:00 2001 From: Dave Tucker Date: Mon, 5 Sep 2022 17:33:31 +0000 Subject: [PATCH 1/2] aya: Fix segfault in define_link_wrapper The From<$wrapper> for $base implemention is refers to itself, eventually causing a segfault. Signed-off-by: Dave Tucker --- aya/src/programs/links.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aya/src/programs/links.rs b/aya/src/programs/links.rs index 1f7a68f0..129d5952 100644 --- a/aya/src/programs/links.rs +++ b/aya/src/programs/links.rs @@ -258,7 +258,7 @@ macro_rules! define_link_wrapper { impl From<$wrapper> for $base { fn from(w: $wrapper) -> $base { - w.into() + w.0 } } }; From 8305ee1eca57f17aa13234bf9b2d92aa65249da7 Mon Sep 17 00:00:00 2001 From: Dave Tucker Date: Mon, 5 Sep 2022 18:31:03 +0000 Subject: [PATCH 2/2] test: Fix clippy lint Signed-off-by: Dave Tucker --- test/integration-test/src/tests/load.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration-test/src/tests/load.rs b/test/integration-test/src/tests/load.rs index 8ee257be..b33e6ab5 100644 --- a/test/integration-test/src/tests/load.rs +++ b/test/integration-test/src/tests/load.rs @@ -61,7 +61,7 @@ fn multiple_btf_maps() -> anyhow::Result<()> { } fn is_loaded() -> bool { - let output = Command::new("bpftool").args(&["prog"]).output().unwrap(); + let output = Command::new("bpftool").args(["prog"]).output().unwrap(); let stdout = String::from_utf8(output.stdout).unwrap(); stdout.contains("test_unload") }