From: "Peter A. Bigot" <pab@pabigot.com>
To: Patches and discussions about the oe-core layer
<Openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] pseudo: fix memory leak and missed privilege drop
Date: Sun, 25 Aug 2013 19:47:43 -0500 [thread overview]
Message-ID: <521AA5AF.8020205@pabigot.com> (raw)
In-Reply-To: <1377477606-17591-1-git-send-email-pab@pabigot.com>
On 08/25/2013 07:40 PM, Peter A. Bigot wrote:
> From: "Peter A. Bigot" <pab@pabigot.com>
>
> qemu.bbclass adds PSEUDO_UNLOAD=1 in qemu_run_binary to avoid reference to
> pseudo functions that may not exist in the target environment. This patch
> detects the addition of that variable within the environment to which the
> call applies, even if not present in the parent environment.
>
> As a side effect it fixes a memory leak.
>
> [YOCTO #4843]
Some explanation because this one bothers me:
I ran into bug #4843 when building core-image-minimal on an Ubuntu 12.04
host under x86_64, where the RPM post-install script for udev-hwdb ran
udevadm under qemu-arm. I added some debug code to pseudo and
determined that pseudo_dropenv() was not being invoked for these
commands, making the presence of PSEUDO_UNLOAD=1 irrelevant.
I discovered that the code that implements the unload didn't look at the
environment that applied to the operation, only to the environment in
which pseudo was being run. I also noticed that the need-to-unload code
appears to have a memory leak.
Please look this over; it does work for me, and it seems like the right
approach, but it also seems like the approach couldn't possibly have
worked in the past and should have been detected before so maybe there's
something else going on my environment.
Peter
next prev parent reply other threads:[~2013-08-26 0:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-26 0:40 [PATCH] pseudo: fix memory leak and missed privilege drop Peter A. Bigot
2013-08-26 0:47 ` Peter A. Bigot [this message]
2013-08-26 4:25 ` Saul Wold
2013-08-26 15:54 ` Mark Hatle
2013-08-26 16:16 ` Peter A. Bigot
2013-09-03 15:41 ` Peter Seebach
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=521AA5AF.8020205@pabigot.com \
--to=pab@pabigot.com \
--cc=Openembedded-core@lists.openembedded.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox