WuBingzheng / libleak

detect memory leak by LD_PRELOAD, without changing the target program
249 stars 52 forks source link

Can't built libleak on CentOS 7 like system #17

Closed vitodb closed 3 years ago

vitodb commented 3 years ago

I tried to build libleak on a CentOS like system, but I can't figure out what package is supposed to provide the header backtrace.h I really appreciate any help to be able to use libleak on CentOS.

WuBingzheng commented 3 years ago

libbacktrace is built-in with GCC at my Ubuntu 16.04. It locates at /usr/lib/gcc/x86_64-linux-gnu/5/libbacktrace.a.

You can get and build it from https://github.com/ianlancetaylor/libbacktrace if your system does not have it.

vitodb commented 3 years ago

Thanks for the help. Building and using libbacktrace as you pointed out, allowed me to build libleak on my system.

I tried to ran libleak on my code and I got an ABORT signal. I figured out I have to increase this array to be able to use libleak to test my code. Is it safe to increase that array? Or would this affect performances?

WuBingzheng commented 3 years ago

Just increase it. It just costs more memory, but not affects performance.