Control: reassign -1 manpages-dev 6.03-2
Control: retitle -1 manpages-dev: mtrace(3): LD_PRELOAD=libc_malloc_debug.so is 
needed
Control: tags -1 upstream

I can also reproduce the issue on a Red Hat machine with glibc 2.34,
but this is actually an error in the man page: one now needs to
preload the libc_malloc_debug.so library.

/usr/share/doc/libc6/NEWS.gz says for 2.34:

* Debugging features in malloc such as the MALLOC_CHECK_ environment variable
  (or the glibc.malloc.check tunable), mtrace() and mcheck() have now been
  disabled by default in the main C library.  Users looking to use these
  features now need to preload a new debugging DSO libc_malloc_debug.so to get
  this functionality back.

So in the example in the mtrace(3) man page

           $ cc -g t_mtrace.c -o t_mtrace
           $ export MALLOC_TRACE=/tmp/t
           $ ./t_mtrace
           $ mtrace ./t_mtrace $MALLOC_TRACE

the 3rd command should be changed to

           $ LD_PRELOAD=libc_malloc_debug.so ./t_mtrace

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to