public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/27883] New: The memusage script does not work if LD_PRELOAD used also for other purposes
@ 2021-05-18  8:27 eru at netti dot fi
  2021-05-18  9:09 ` [Bug libc/27883] " schwab@linux-m68k.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: eru at netti dot fi @ 2021-05-18  8:27 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27883

            Bug ID: 27883
           Summary: The memusage script does not work if LD_PRELOAD used
                    also for other purposes
           Product: glibc
           Version: 2.32
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: eru at netti dot fi
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

The memusage script uses LD_PRELOAD to inject libmemusage.so at start-up.
However, it completely overrides the variable, which causes problems, if the
user also needs to define the variable to add other .so files. (Happened in a
testing framework I am using). One possible fix:

if [[ "${LD_PRELOAD:-UNSET}" = "UNSET" ]]; then
  add_env="LD_PRELOAD=$memusageso"
else
  add_env="LD_PRELOAD=${LD_PRELOAD}:$memusageso"
fi

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug libc/27883] The memusage script does not work if LD_PRELOAD used also for other purposes
  2021-05-18  8:27 [Bug libc/27883] New: The memusage script does not work if LD_PRELOAD used also for other purposes eru at netti dot fi
@ 2021-05-18  9:09 ` schwab@linux-m68k.org
  2021-05-18 13:34 ` eru at netti dot fi
  2023-07-03  1:55 ` ppluzhnikov at google dot com
  2 siblings, 0 replies; 4+ messages in thread
From: schwab@linux-m68k.org @ 2021-05-18  9:09 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27883

--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> ---
add_env=LD_PRELOAD=${LD_PRELOAD:+${LD_PRELOAD}:}$memusageso

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug libc/27883] The memusage script does not work if LD_PRELOAD used also for other purposes
  2021-05-18  8:27 [Bug libc/27883] New: The memusage script does not work if LD_PRELOAD used also for other purposes eru at netti dot fi
  2021-05-18  9:09 ` [Bug libc/27883] " schwab@linux-m68k.org
@ 2021-05-18 13:34 ` eru at netti dot fi
  2023-07-03  1:55 ` ppluzhnikov at google dot com
  2 siblings, 0 replies; 4+ messages in thread
From: eru at netti dot fi @ 2021-05-18 13:34 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27883

--- Comment #2 from Erkki Ruohtula <eru at netti dot fi> ---
(In reply to Andreas Schwab from comment #1)
> add_env=LD_PRELOAD=${LD_PRELOAD:+${LD_PRELOAD}:}$memusageso

Certainly a better fix.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug libc/27883] The memusage script does not work if LD_PRELOAD used also for other purposes
  2021-05-18  8:27 [Bug libc/27883] New: The memusage script does not work if LD_PRELOAD used also for other purposes eru at netti dot fi
  2021-05-18  9:09 ` [Bug libc/27883] " schwab@linux-m68k.org
  2021-05-18 13:34 ` eru at netti dot fi
@ 2023-07-03  1:55 ` ppluzhnikov at google dot com
  2 siblings, 0 replies; 4+ messages in thread
From: ppluzhnikov at google dot com @ 2023-07-03  1:55 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27883

Paul Pluzhnikov <ppluzhnikov at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
                 CC|                            |ppluzhnikov at google dot com
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2023-07-03

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2023-07-03  1:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18  8:27 [Bug libc/27883] New: The memusage script does not work if LD_PRELOAD used also for other purposes eru at netti dot fi
2021-05-18  9:09 ` [Bug libc/27883] " schwab@linux-m68k.org
2021-05-18 13:34 ` eru at netti dot fi
2023-07-03  1:55 ` ppluzhnikov at google dot com

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).