Skip to content

Commit

Permalink
btf_sanitizer: disable BTF deduplication temporarily
Browse files Browse the repository at this point in the history
Otherwise this will lead to .BTF.ext loading failure.

Signed-off-by: Tw <[email protected]>
  • Loading branch information
tw4452852 committed Aug 12, 2024
1 parent 853aca8 commit 2463f10
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/btf_sanitizer/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,17 @@ pub fn main() !void {

// deduplication and finalize BTF
// NOTE: redefine due to the original one has bitfields
const OPT = extern struct {
sz: usize = @sizeOf(@This()),
btf_ext: ?*c.btf_ext = null,
force_collisions: bool = false,
};
ret = c.btf__dedup(dst_btf, @ptrCast(&OPT{}));
if (ret != 0) {
print("failed to dedup BTF: {}\n", .{std.posix.errno(-1)});
return error.INTERNAL;
if (false) {
const OPT = extern struct {
sz: usize = @sizeOf(@This()),
btf_ext: ?*c.btf_ext = null,
force_collisions: bool = false,
};
ret = c.btf__dedup(dst_btf, @ptrCast(&OPT{}));
if (ret != 0) {
print("failed to dedup BTF: {}\n", .{std.posix.errno(-1)});
return error.INTERNAL;
}
}
buf = c.btf__raw_data(dst_btf, &sz);

Expand Down

0 comments on commit 2463f10

Please sign in to comment.