repo string | pull_number int64 | instance_id string | issue_numbers sequence | base_commit string | patch string | test_patch string | problem_statement string | hints_text string | created_at string | version string | updated_at string | environment_setup_commit string | FAIL_TO_PASS sequence | PASS_TO_PASS sequence | FAIL_TO_FAIL sequence | PASS_TO_FAIL sequence | source_dir string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aya-rs/aya | 774 | aya-rs__aya-774 | [
"636"
] | 792f467d40dc4c6c543c62dda7a608863fc364dc | diff --git a/aya/src/maps/mod.rs b/aya/src/maps/mod.rs
--- a/aya/src/maps/mod.rs
+++ b/aya/src/maps/mod.rs
@@ -291,9 +291,9 @@ macro_rules! impl_try_from_map {
// rather than the repeated idents used later because the macro language does not allow one
// repetition to be pasted inside another.
($ty_param... | diff --git a/aya/src/maps/hash_map/hash_map.rs b/aya/src/maps/hash_map/hash_map.rs
--- a/aya/src/maps/hash_map/hash_map.rs
+++ b/aya/src/maps/hash_map/hash_map.rs
@@ -108,43 +108,22 @@ mod tests {
use libc::{EFAULT, ENOENT};
use crate::{
- bpf_map_def,
generated::{
bpf_attr, bpf... | cant' use LruHashMap in userspace
the userspace HashMap try_from impl
```rust
impl<'a, V: Pod, K: Pod> TryFrom<&'a mut Map> for HashMap<&'a mut MapData, V, K> {
type Error = MapError;
fn try_from(map: &'a mut Map) -> Result<HashMap<&'a mut MapData, V, K>, MapError> {
match map {
Ma... | https://docs.rs/aya/latest/src/aya/maps/hash_map/hash_map.rs.html#48
the crates.io version handled the lruhashmap
maybe we can add a new type LruHashMap to fix this problem
Do you have a test? I don't understand this issue.
sorry for the late reply
kernel space codes
main.rs
```rust
#[xdp(name = "lru_test")]... | 2023-08-31T01:49:22Z | 1.5 | 2023-09-01T15:30:33Z | 1d272f38bd19f64652ac8a278948f61e66164856 | [
"maps::hash_map::hash_map::tests::test_try_from_ok_lru",
"maps::hash_map::per_cpu_hash_map::tests::test_try_from_ok_lru"
] | [
"maps::bloom_filter::tests::test_contains_not_found",
"maps::bloom_filter::tests::test_contains_syscall_error",
"maps::bloom_filter::tests::test_insert_ok",
"maps::bloom_filter::tests::test_insert_syscall_error",
"maps::bloom_filter::tests::test_new_ok",
"maps::bloom_filter::tests::test_try_from_ok",
"m... | [] | [] | auto_2025-06-07 |
aya-rs/aya | 656 | aya-rs__aya-656 | [
"654"
] | 61608e64583f9dc599eef9b8db098f38a765b285 | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -24,7 +24,6 @@ resolver = "2"
default-members = [
"aya",
- "aya-bpf-macros",
"aya-log",
"aya-log-common",
"aya-log-parser",
diff --git a/aya-obj/Cargo.toml b/aya-obj/Cargo.toml
--- a/aya-obj/Cargo.toml
+++ b/aya-obj/Carg... | diff --git a/aya-obj/src/obj.rs b/aya-obj/src/obj.rs
--- a/aya-obj/src/obj.rs
+++ b/aya-obj/src/obj.rs
@@ -1486,7 +1486,7 @@ pub fn copy_instructions(data: &[u8]) -> Result<Vec<bpf_insn>, ParseError> {
#[cfg(test)]
mod tests {
use alloc::vec;
- use matches::assert_matches;
+ use assert_matches::assert_matc... | Kernel version detection is broken on WSL
Using aya from with the yesterday's commit fails with
```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseError(Parse("90.1", "patch"))', /home/debian/.cargo/git/checkouts/aya-c55fbc69175ac116/242d8c3/aya/src/maps/mod.rs:504:55
```
when runnin... | 2023-07-14T14:51:06Z | 0.11 | 2023-07-15T03:18:35Z | 61608e64583f9dc599eef9b8db098f38a765b285 | [
"btf::btf::tests::parsing_older_ext_data",
"btf::btf::tests::test_fixup_ptr",
"btf::btf::tests::test_fixup_func_proto",
"btf::btf::tests::test_fixup_datasec",
"btf::btf::tests::test_parse_header",
"btf::btf::tests::test_sanitize_datasec",
"btf::btf::tests::test_parse_btf",
"btf::btf::tests::test_sanit... | [
"tests::btf_relocations::relocate_enum64",
"tests::btf_relocations::relocate_enum64_signed",
"tests::btf_relocations::relocate_enum_signed",
"tests::load::pin_lifecycle",
"tests::smoke::xdp"
] | [
"tests::btf_relocations::relocate_pointer",
"tests::elf::test_maps",
"tests::btf_relocations::relocate_field",
"tests::btf_relocations::relocate_struct_flavors",
"tests::btf_relocations::relocate_enum",
"tests::rbpf::use_map_with_rbpf",
"tests::rbpf::run_with_rbpf",
"tests::load::pin_lifecycle_kprobe"... | [] | auto_2025-06-07 | |
aya-rs/aya | 921 | aya-rs__aya-921 | [
"918"
] | 1d272f38bd19f64652ac8a278948f61e66164856 | diff --git a/aya/src/programs/cgroup_device.rs b/aya/src/programs/cgroup_device.rs
--- a/aya/src/programs/cgroup_device.rs
+++ b/aya/src/programs/cgroup_device.rs
@@ -8,7 +8,7 @@ use crate::{
bpf_prog_get_fd_by_id, define_link_wrapper, load_program, query, CgroupAttachMode, FdLink,
Link, ProgAttachLin... | diff --git a/aya/src/programs/links.rs b/aya/src/programs/links.rs
--- a/aya/src/programs/links.rs
+++ b/aya/src/programs/links.rs
@@ -394,6 +397,125 @@ pub enum LinkError {
SyscallError(#[from] SyscallError),
}
+#[derive(Debug)]
+pub(crate) enum LinkRef {
+ Id(u32),
+ Fd(RawFd),
+}
+
+bitflags::bitflags!... | Add TCX link support
Following the recent addition of [link support for TC programs](https://lwn.net/Articles/938632/) we should add the necessary bits to support this in aya as well.
The [commit adding support to the cilium ebpf library](https://github.com/cilium/ebpf/commit/417f8a264d2e691649ede9b995fb334e6c58ca... | 2024-04-05T15:21:29Z | 1.5 | 2024-10-09T09:31:40Z | 1d272f38bd19f64652ac8a278948f61e66164856 | [
"bpf::tests::test_adjust_to_page_size",
"bpf::tests::test_max_entries_override",
"maps::bloom_filter::tests::test_contains_syscall_error",
"maps::bloom_filter::tests::test_contains_not_found",
"maps::bloom_filter::tests::test_insert_ok",
"maps::bloom_filter::tests::test_insert_syscall_error",
"maps::blo... | [] | [] | [] | auto_2025-06-07 | |
aya-rs/aya | 897 | aya-rs__aya-897 | [
"896"
] | b6a84b658ae00f23d0f1721c30d11f2e57f99eab | diff --git a/aya-bpf-macros/src/cgroup_skb.rs b/aya-bpf-macros/src/cgroup_skb.rs
--- a/aya-bpf-macros/src/cgroup_skb.rs
+++ b/aya-bpf-macros/src/cgroup_skb.rs
@@ -29,7 +29,7 @@ impl CgroupSkb {
let section_name: Cow<'_, _> = if self.attach_type.is_some() {
format!("cgroup_skb/{}", self.attach_type... | diff --git a/aya-bpf-macros/src/cgroup_skb.rs b/aya-bpf-macros/src/cgroup_skb.rs
--- a/aya-bpf-macros/src/cgroup_skb.rs
+++ b/aya-bpf-macros/src/cgroup_skb.rs
@@ -66,7 +66,7 @@ mod tests {
let expanded = prog.expand().unwrap();
let expected = quote! {
#[no_mangle]
- #[link_sect... | Error: error parsing BPF object: invalid program section `cgroup_skb`
**My program code:
```
#[cgroup_skb]
pub fn cg01(ctx: SkBuffContext) -> i32 {
match try_cg02(ctx) {
Ok(ret) => ret,
Err(ret) => ret,
}
}
fn try_cg01(ctx: SkBuffContext) -> Result<i32, i32> {
info!(&ctx, "received... | Change
```
#[cgroup_skb]
```
to
```
#[cgroup_skb(ingress)]
```
if you want to hook to ingress or
```
#[cgroup_skb(egress)]
```
if you want to hook to egress
@dave-tucker looks like this was broken in https://github.com/aya-rs/aya/commit/c72aab5f7b809b48273cd2fed4554ddff6b66bdf#diff-748602d38469... | 2024-03-04T07:45:13Z | 1.5 | 2024-03-04T08:53:45Z | 1d272f38bd19f64652ac8a278948f61e66164856 | [
"cgroup_skb::tests::cgroup_skb"
] | [
"cgroup_device::tests::test_cgroup_device",
"btf_tracepoint::tests::test_btf_tracepoint",
"cgroup_skb::tests::cgroup_skb_egress",
"btf_tracepoint::tests::test_btf_tracepoint_with_function",
"cgroup_skb::tests::cgroup_skb_ingress",
"cgroup_skb::tests::priv_function",
"cgroup_skb::tests::pub_crate_functio... | [] | [] | auto_2025-06-07 |
aya-rs/aya | 431 | aya-rs__aya-431 | [
"427"
] | 82773f46c8cff830b36b8b4f57100952eb6ec8d2 | diff --git a/aya/src/maps/array/array.rs b/aya/src/maps/array/array.rs
--- a/aya/src/maps/array/array.rs
+++ b/aya/src/maps/array/array.rs
@@ -1,4 +1,5 @@
use std::{
+ borrow::Borrow,
convert::{AsMut, AsRef},
marker::PhantomData,
};
diff --git a/aya/src/maps/array/array.rs b/aya/src/maps/array/array.rs
-... | diff --git a/aya/src/maps/hash_map/hash_map.rs b/aya/src/maps/hash_map/hash_map.rs
--- a/aya/src/maps/hash_map/hash_map.rs
+++ b/aya/src/maps/hash_map/hash_map.rs
@@ -311,6 +317,27 @@ mod tests {
assert!(hm.insert(1, 42, 0).is_ok());
}
+ #[test]
+ fn test_insert_boxed_ok() {
+ override_sysc... | API for updating maps with large Pod
Although Rust is memory safe, it does not have any stack overflow protection. The default Rust stack is 2MB which is plenty for most applications. However, when dealing with Pod with large arrays embedded, it's possible to overflow the user space Rust stack.
Here's an example:
... | We can change the insert() calls to take `AsRef<K>` and `AsRef<V>` so they work with both values and references (including boxes) | 2022-11-01T20:35:41Z | 0.11 | 2023-02-23T09:59:02Z | 61608e64583f9dc599eef9b8db098f38a765b285 | [
"maps::bloom_filter::tests::test_contains_syscall_error",
"maps::bloom_filter::tests::test_contains_not_found",
"maps::bloom_filter::tests::test_insert_ok",
"maps::bloom_filter::tests::test_insert_syscall_error",
"maps::bloom_filter::tests::test_new_not_created",
"maps::bloom_filter::tests::test_new_ok",
... | [] | [] | [] | auto_2025-06-07 |
aya-rs/aya | 90 | aya-rs__aya-90 | [
"88"
] | 3a8e4fe9b91538a0fafd8c91ae96185c1a017651 | diff --git a/aya/src/obj/mod.rs b/aya/src/obj/mod.rs
--- a/aya/src/obj/mod.rs
+++ b/aya/src/obj/mod.rs
@@ -410,6 +410,7 @@ struct Section<'a> {
address: u64,
name: &'a str,
data: &'a [u8],
+ size: u64,
relocations: Vec<Relocation>,
}
diff --git a/aya/src/obj/mod.rs b/aya/src/obj/mod.rs
--- a/a... | diff --git a/aya/src/obj/mod.rs b/aya/src/obj/mod.rs
--- a/aya/src/obj/mod.rs
+++ b/aya/src/obj/mod.rs
@@ -607,6 +611,7 @@ mod tests {
address: 0,
name,
data,
+ size: data.len() as u64,
relocations: Vec::new(),
}
}
| bpf(2) fails with invalid argument when creating .bss map
I wanted to test out a simple example of using .data, .rodata, and .bss maps in Aya. It seems that .data and .rodata work just fine, but creating the .bss map always seems to fail with an invalid argument error. Inspecting the strace dump (shown below), the offe... | 2021-10-31T00:02:13Z | 0.10 | 2021-11-04T06:00:06Z | b9a544831c5b4cd8728e9cca6580c14a623b7793 | [
"maps::hash_map::hash_map::tests::test_get_syscall_error",
"maps::hash_map::hash_map::tests::test_insert_ok",
"maps::hash_map::hash_map::tests::test_get_not_found",
"maps::hash_map::hash_map::tests::test_insert_syscall_error",
"maps::hash_map::hash_map::tests::test_iter",
"maps::hash_map::hash_map::tests:... | [] | [] | [] | auto_2025-06-07 | |
aya-rs/aya | 85 | aya-rs__aya-85 | [
"84"
] | c4b6970774930540ece21df329a1abd8dcb4ceb7 | "diff --git a/aya/src/bpf.rs b/aya/src/bpf.rs\n--- a/aya/src/bpf.rs\n+++ b/aya/src/bpf.rs\n@@ -20,9 (...TRUNCATED) | "diff --git a/aya/src/obj/mod.rs b/aya/src/obj/mod.rs\n--- a/aya/src/obj/mod.rs\n+++ b/aya/src/obj/m(...TRUNCATED) | "Support BTF tracepoints (tp_btf/*, also called \"BTF-enabled raw tracepoints\")\n#68 added support (...TRUNCATED) | 2021-10-28T21:14:42Z | 0.10 | 2021-10-29T16:37:08Z | b9a544831c5b4cd8728e9cca6580c14a623b7793 | ["maps::hash_map::hash_map::tests::test_get_syscall_error","maps::hash_map::hash_map::tests::test_ge(...TRUNCATED) | [] | [] | [] | auto_2025-06-07 | |
aya-rs/aya | 253 | aya-rs__aya-253 | [
"51"
] | b9a544831c5b4cd8728e9cca6580c14a623b7793 | "diff --git a/aya/src/programs/cgroup_skb.rs b/aya/src/programs/cgroup_skb.rs\n--- a/aya/src/program(...TRUNCATED) | "diff --git a/aya/src/programs/links.rs b/aya/src/programs/links.rs\n--- a/aya/src/programs/links.rs(...TRUNCATED) | "lifecyle: Add a `forget()` API for `Link`\nDefault behaviour is that the `Drop` trait calls `detach(...TRUNCATED) | "I'm not sure it should be called `forget()`, but then again I am struggling to come up with a bette(...TRUNCATED) | 2022-05-06T23:27:37Z | 0.10 | 2022-05-12T18:56:36Z | b9a544831c5b4cd8728e9cca6580c14a623b7793 | ["maps::hash_map::hash_map::tests::test_insert_ok","maps::hash_map::hash_map::tests::test_get_not_fo(...TRUNCATED) | [] | [] | [] | auto_2025-06-07 |
sharkdp/bat | 1,017 | sharkdp__bat-1017 | [
"1008"
] | d6abad908a51cf9396cc8521a5ec94b1fc9206ea | "diff --git a/src/syntax_mapping.rs b/src/syntax_mapping.rs\n--- a/src/syntax_mapping.rs\n+++ b/src/(...TRUNCATED) | "diff --git a/src/assets.rs b/src/assets.rs\n--- a/src/assets.rs\n+++ b/src/assets.rs\n@@ -481,4 +48(...TRUNCATED) | "bin/rails script highlighted as HTML (Rails) instead of Ruby\n<!--\r\nHey there, thanks for creatin(...TRUNCATED) | "Thank you for reporting this!\r\n\r\nWe recently discussed whether first-line syntax detection shou(...TRUNCATED) | 2020-05-24T08:23:09Z | 0.15 | 2020-05-24T09:27:48Z | 2d1a92b7cc2af6c35f868cbefe9dbfe466c59fcb | ["config::default_config_should_highlight_no_lines","config::default_config_should_include_all_lines(...TRUNCATED) | [] | [] | [] | auto_2025-06-07 |
sharkdp/bat | 1,556 | sharkdp__bat-1556 | [
"1550"
] | c569774e1a8528fab91225dabdadf53fde3916ea | "diff --git a/CHANGELOG.md b/CHANGELOG.md\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -16,6 +16,7 @@(...TRUNCATED) | "diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs\n--- a/tests/integration_tests(...TRUNCATED) | "BAT_CONFIG_PATH ignored by --generate-config-file\n<!-- Hey there, thank you for creating an issue!(...TRUNCATED) | "Thank you for reporting this. Looks like a bug indeed.\nI can confirm this bug, which is generic. I(...TRUNCATED) | 2021-02-27T11:22:32Z | 0.17 | 2021-02-28T14:19:15Z | c569774e1a8528fab91225dabdadf53fde3916ea | [
"config_location_test"
] | ["line_range::test_ranges_open_low","input::utf16le","less::test_parse_less_version_487","less::test(...TRUNCATED) | [] | [] | auto_2025-06-07 |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 4