From: Eamon Walsh <ewalsh@tycho.nsa.gov>
To: Eric Blake <eblake@redhat.com>
Cc: SELinux@tycho.nsa.gov
Subject: Re: libselinux memory leak in multi-threaded processes due to abuse of __thread
Date: Thu, 02 Dec 2010 20:02:06 -0500 [thread overview]
Message-ID: <4CF8418E.8030609@tycho.nsa.gov> (raw)
In-Reply-To: <4CF8089B.7020301@redhat.com>
On 12/02/2010 03:59 PM, Eric Blake wrote:
> On 11/30/2010 04:47 PM, Eric Blake wrote:
>> Here's a simple program that demonstrates that libselinux's attempts to
>> cache data ends up being a memory leak instead. The problem is that
>> __thread variables have no destructor, so when a long-running program
>> that uses multiple pthreads, where each thread uses selinux functions
>> which stash malloc'd memory into a __thread cache, then the cache memory
>> is leaked when the threads exit.
> Eamon's patch[1] looks good to me; and a quick test with my sample
> program proves that it avoids the leak.
>
> [1] https://bugzilla.redhat.com/attachment.cgi?id=464338, found at
> https://bugzilla.redhat.com/show_bug.cgi?id=658571
>
Pushed to libselinux 2.0.97.
--
Eamon Walsh
National Security Agency
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
prev parent reply other threads:[~2010-12-03 1:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-30 23:47 libselinux memory leak in multi-threaded processes due to abuse of __thread Eric Blake
2010-12-02 20:59 ` Eric Blake
2010-12-03 1:02 ` Eamon Walsh [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CF8418E.8030609@tycho.nsa.gov \
--to=ewalsh@tycho.nsa.gov \
--cc=SELinux@tycho.nsa.gov \
--cc=eblake@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.