Skip to content

Instantly share code, notes, and snippets.

@erplsf
Created August 26, 2022 20:31
Show Gist options
  • Save erplsf/f1395abbf40f5373f35f6501c3b8de7d to your computer and use it in GitHub Desktop.
Save erplsf/f1395abbf40f5373f35f6501c3b8de7d to your computer and use it in GitHub Desktop.
reproducible
binary was built under nixos, against 8bcb962ada2ea5cfeeff303e1063937ee13af6ad.
to reproduce:
1. `zig build-exe test.zig`
2. `valgrind ./test`
3. observe that there are no names of functions
4. `valgrind --tool=callgrind ./test`
5. `kcachegrind`
6. observe that the call stack doesn't show any names.
const std = @import("std");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer _ = gpa.deinit();
const allocator = gpa.allocator();
const buffer = try allocator.alloc(u8, 100);
_ = buffer;
std.log.info("All your memory belongs to us.", .{});
}
@erplsf
Copy link
Author

erplsf commented Aug 26, 2022

valgrind reports this version: valgrind-3.19.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment