public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Mtrace with no environment MALLOC_TRACE feature request mtrace_setpath.
@ 2019-01-03 21:17 Joseph Howard
  2019-01-03 21:53 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: Joseph Howard @ 2019-01-03 21:17 UTC (permalink / raw)
  To: gcc

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Mtrace with no environment MALLOC_TRACE feature request mtrace_setpath.
  2019-01-03 21:17 Mtrace with no environment MALLOC_TRACE feature request mtrace_setpath Joseph Howard
@ 2019-01-03 21:53 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2019-01-03 21:53 UTC (permalink / raw)
  To: Joseph Howard; +Cc: gcc

On Thu, 3 Jan 2019 at 21:18, Joseph Howard wrote:
>
> Request for mtrace_setpath

I think you should have sent this to glibc, which is a completely
separate project to GCC.

See https://www.gnu.org/software/libc/libc.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-03 21:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-03 21:17 Mtrace with no environment MALLOC_TRACE feature request mtrace_setpath Joseph Howard
2019-01-03 21:53 ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).