Neat! Although, I'm curious why the tool doesn't just run addr2line for you?
Are you asking why doesn't it execv(2) addr2line deep within the libc malloc implementation? Because calling execv(2) within libraries is frowned upon.. ;-) The leak report is being generated internally by malloc. It is then logged via utrace(2) when a process is traced through ktrace(1). The kdump utility simply dumps the report, strvis(3) escaping any potentially unsafe characters. As this is untrusted user data, p…
I guess I’m confused what’s printing the output here. On other OSes typically things like this are implemented by malloc recording the addresses and whatever parses the report later doing the symbolication when displaying it. I guess kdump just dumps the report but is there no porcelain that takes the kdump data and cleans it up a bit more for human consumption?