3 ms·
I recently encountered dietlibc while trying to debug a segfault in integrit [1]. As packaged in Debian, integrit is a static binary using dietlibc. For some un
by avian 7y ago
I recently encountered dietlibc while trying to debug a segfault in integrit [1]. As packaged in Debian, integrit is a static binary using dietlibc. For some unknown reason I found it completely impossible to get any usable stacktrace out of it with gdb and the usual tools and after a few days of frustration I gave up on finding the cause.
[1] https://github.com/integrit/integrit https://github.com/integrit/integrit
- breadbox 7y agoYes, part of the usual process of making a tiny binary is jettisoning much of the overhead that debuggers depend on in order to find their way through an external program. Not just the debugging symbols themselves, but things like section header tables and maintenance of linked stack frames in the running code. Dumping all of that saves space, at the expense of making the resulting binary more and more opaque.
- saagarjha 7y agoIt’s probably because the code optimized out the frame pointer; if you really wanted a backtrace you’d need to look back at the stack to see where the return address was.