Skip to content

Commit

Permalink
capi: Don't use vmlinux in symbolize_in_kernel() test
Browse files Browse the repository at this point in the history
The symbolize_in_kernel() test may inadvertently use a vmlinux file that
could be present on the system and that could lead to a wrong
symbolization. Given that the test is only meant to work with kallsyms
image, disable usage of vmlinux altogether to prevent any interference
with system data.

Signed-off-by: Daniel Müller <[email protected]>
  • Loading branch information
d-e-s-o committed Feb 20, 2025
1 parent 22c6565 commit b8f40c0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions capi/src/symbolize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1986,6 +1986,7 @@ mod tests {
let path_c = CString::new(path.to_str().unwrap()).unwrap();
let src = blaze_symbolize_src_kernel {
kallsyms: path_c.as_ptr(),
vmlinux: b"\0" as *const _ as *const c_char,
..Default::default()
};

Expand Down

0 comments on commit b8f40c0

Please sign in to comment.