Bug#1054487: manpages-dev: mtrace(3): LD_PRELOAD=libc_malloc_debug.so is needed

2023-10-24 Thread Vincent Lefevre
Control: retitle -1 manpages-dev: mcheck(3), mtrace(3): 
LD_PRELOAD=libc_malloc_debug.so is needed
Control: forwarded -1 
https://lore.kernel.org/linux-man/20231024143144.76490-1-vinc...@vinc17.net/T/#u

There's the same issue in the mcheck(3) man page. I've submitted
a patch upstream.

Ideally, the DESCRIPTION section should also mention the need of
preloading libc_malloc_debug.so...

BTW, I've just noticed that the mallopt(3) man page may need to be
updated too (I've not tested yet).

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Bug#1054487: manpages-dev: mtrace(3): LD_PRELOAD=libc_malloc_debug.so is needed

2023-10-24 Thread Vincent Lefevre
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  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)