Skip to content

Commit

Permalink
btf: fix regression computing pointer sizes
Browse files Browse the repository at this point in the history
Computing pointer sizes was broken in #285
  • Loading branch information
alessandrod committed Dec 31, 2022
1 parent 890e8c9 commit 12e422b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions aya/src/obj/btf/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,7 @@ impl BtfType {
BtfType::Struct(t) => Some(t.size),
BtfType::Union(t) => Some(t.size),
BtfType::DataSec(t) => Some(t.size),
BtfType::Ptr(_) => Some(mem::size_of::<&()>() as u32),
_ => None,
}
}
Expand Down

0 comments on commit 12e422b

Please sign in to comment.