- Package:
- manpages-dev
- Source:
- manpages-dev
- Submitter:
- Vincent Lefevre
- Date:
- 2026-01-10 10:59:31 UTC
- Severity:
- normal
- Tags:
Even when MALLOC_TRACE is set, mtrace() doesn't produce any result. I've tested the example given in the mtrace(3) man page, and the /tmp/t file is not created.
Control: retitle -1 libc6: mtrace doesn't produce any result Control: found -1 2.36-9+deb12u3 Same issue on cfarm29.cfarm.net (ppc64le, Debian 12.2). The example works fine on Debian 11.
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
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).
Es gibt eine Familienspende in Höhe von 1.850.000,00 USD von Cheng Charlie Saephan. Bitte antworten Sie für weitere Informationen. Denken Sie daran, Ihrer Familie und den Bedürftigen in Ihrer Umgebung Gutes zu tun. Dies ist bereits der zweite Versuch, Sie zu erreichen. Bitte antworten Sie für weitere Details.
Es gibt eine Familienspende in Höhe von 1.850.000,00 USD von Cheng Charlie Saephan. Bitte antworten Sie für weitere Informationen. Denken Sie daran, Ihrer Familie und den Bedürftigen in Ihrer Umgebung Gutes zu tun. Dies ist bereits der zweite Versuch, Sie zu erreichen. Bitte antworten Sie für weitere Details.