This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Mtrace with no environment MALLOC_TRACE feature request mtrace_setpath.
- From: Joseph Howard <jhoward at technicacorp dot com>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Thu, 3 Jan 2019 21:17:50 +0000
- Subject: Mtrace with no environment MALLOC_TRACE feature request mtrace_setpath.
Request for mtrace_setpath
In debugging and profiling PAM (Pluggable Authentication Modules) modules for memory leaks in linux, mtrace cannot access environment variables as these do not exist until the authentication completes (e.g. /etc/environment . The MALLOC_TRACE path can only be supplied as an environment variable. Please add a feature to allow the passing of a trace path to mtrace. The module workaround is to add putenv("MALLOC_TRACE=/var/log/mypammemleak.log");
Globally changing the linux environment values to trace a security module should not be an answer.
Please consider adding a mtrace_setpath(const char* path);
Note : pam_env.so creates environment variables afterward. I've checked everything other than rebuilding PAM.
Module order does not matter.
Joe