The glibc 2.34 NEWS file says that mtrace() and mcheck() have now been disabled in the main C library, and preloading libc_malloc_debug.so is needed to get this functionality back. So the examples now need a "LD_PRELOAD=libc_malloc_debug.so". Signed-off-by: Vincent Lefevre <vincent@xxxxxxxxxx> --- man3/mcheck.3 | 2 +- man3/mtrace.3 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/man3/mcheck.3 b/man3/mcheck.3 index 285ea946c..e17650a4c 100644 --- a/man3/mcheck.3 +++ b/man3/mcheck.3 @@ -169,7 +169,7 @@ when running the program: .PP .in +4n .EX -.RB "$" " ./a.out" +.RB "$ " "LD_PRELOAD=libc_malloc_debug.so ./a.out" About to free \& About to free a second time diff --git a/man3/mtrace.3 b/man3/mtrace.3 index f30511cd0..d0cde42c9 100644 --- a/man3/mtrace.3 +++ b/man3/mtrace.3 @@ -153,7 +153,7 @@ diagnosed memory leaks at two different locations in the program: .EX .RB "$ " "cc \-g t_mtrace.c \-o t_mtrace" .RB "$ " "export MALLOC_TRACE=/tmp/t" -.RB "$ " "./t_mtrace" +.RB "$ " "LD_PRELOAD=libc_malloc_debug.so ./t_mtrace" .RB "$ " "mtrace ./t_mtrace $MALLOC_TRACE" Memory not freed: -\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- -- 2.42.0