repo stringclasses 47
values | pull_number int64 2 17k | instance_id stringlengths 14 36 | issue_numbers sequencelengths 1 3 | base_commit stringlengths 40 40 | patch stringlengths 274 1.45M | test_patch stringlengths 254 594k | problem_statement stringlengths 34 44.3k | hints_text stringlengths 0 66.2k | created_at stringdate 2017-03-29 16:32:14 2024-12-29 18:55:13 | version stringclasses 76
values | updated_at stringdate 2017-04-05 19:13:00 2025-03-25 20:07:17 | environment_setup_commit stringlengths 40 40 | FAIL_TO_PASS sequencelengths 1 1.57k | PASS_TO_PASS sequencelengths 0 1.78k | FAIL_TO_FAIL sequencelengths 0 83 | PASS_TO_FAIL sequencelengths 0 3 | source_dir stringclasses 13
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 |
fschutt/azul | 2 | fschutt__azul-2 | [
"1"
] | af100e8cbddaeb26cf97cb9910518aaf6bd2ed3a | "diff --git a/Cargo.toml b/Cargo.toml\n--- a/Cargo.toml\n+++ b/Cargo.toml\n@@ -4,7 +4,7 @@ version =(...TRUNCATED) | "diff --git a/examples/test_content.css b/examples/test_content.css\n--- a/examples/test_content.css(...TRUNCATED) | "\"debug\" example crashes\nI am not sure if it is expected on the current state of the project deve(...TRUNCATED) | 2018-03-20T08:12:26Z | 0.1 | 2018-03-20T08:28:37Z | 56d6c2bac9b752264871afab1119a34365aceacb | ["css_parser::test_parse_box_shadow_1","css_parser::test_parse_box_shadow_10","css_parser::test_pars(...TRUNCATED) | [] | [] | [] | auto_2025-06-07 | |
imsnif/bandwhich | 23 | imsnif__bandwhich-23 | [
"16"
] | 408ec397c81bb99d6727f01d5dc058e814012714 | "diff --git a/README.md b/README.md\n--- a/README.md\n+++ b/README.md\n@@ -29,7 +29,7 @@ Windows is (...TRUNCATED) | "diff --git a/README.md b/README.md\n--- a/README.md\n+++ b/README.md\n@@ -46,14 +46,14 @@ Note that(...TRUNCATED) | "Listen on all interfaces\n`what` now listens on the interface given by the `-i` flag. The default b(...TRUNCATED) | 2019-12-10T22:07:27Z | 0.4 | 2019-12-22T09:53:02Z | 408ec397c81bb99d6727f01d5dc058e814012714 | ["tests::cases::ui::basic_startup","tests::cases::ui::layout_under_120_width_under_30_height","tests(...TRUNCATED) | [] | [] | [] | auto_2025-06-07 |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 67