Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The embeded BPF program can't be used directly #2

Closed
tw4452852 opened this issue Apr 23, 2023 · 0 comments
Closed

The embeded BPF program can't be used directly #2

tw4452852 opened this issue Apr 23, 2023 · 0 comments

Comments

@tw4452852
Copy link
Owner

Nowadays, we have to duplicate the original BPF program as follows:

    const obj_bytes = @embedFile("@perf_event");
    const bytes = try allocator.dupe(u8, obj_bytes);
    defer allocator.free(bytes);

Once ziglang/zig#4680 is resolved, this WA could be removed.

tw4452852 added a commit that referenced this issue May 31, 2024
…t issue

If building with Debug, we will encounter illegal instruction exception due to
https://github.com/ziglang/zig/wiki/FAQ#why-do-i-get-illegal-instruction-when-using-with-zig-cc-to-build-c-code
So let's workaround this issue right now.

Close issue #2

Signed-off-by: Tw <tw19881113@gmail.com>
tw4452852 added a commit that referenced this issue May 31, 2024
…t issue

If building with Debug, we will encounter illegal instruction exception due to
https://github.com/ziglang/zig/wiki/FAQ#why-do-i-get-illegal-instruction-when-using-with-zig-cc-to-build-c-code
So let's workaround this issue right now.

Close issue #2

Signed-off-by: Tw <tw19881113@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant