From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46987) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ri9lg-0001fK-Fj for qemu-devel@nongnu.org; Tue, 03 Jan 2012 14:11:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ri9lf-0001w7-KL for qemu-devel@nongnu.org; Tue, 03 Jan 2012 14:11:28 -0500 Received: from mail-yw0-f45.google.com ([209.85.213.45]:54986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ri9lf-0001vx-FP for qemu-devel@nongnu.org; Tue, 03 Jan 2012 14:11:27 -0500 Received: by yhgg71 with SMTP id g71so11312064yhg.4 for ; Tue, 03 Jan 2012 11:11:26 -0800 (PST) MIME-Version: 1.0 Sender: lxnay@sabayonlinux.org In-Reply-To: <5410BBE9-2297-407B-A7D7-37EFD6A70AB3@suse.de> References: <1325605408-16401-1-git-send-email-lxnay@sabayon.org> <9C571929-67D3-45BD-A498-172280E90E08@suse.de> <5410BBE9-2297-407B-A7D7-37EFD6A70AB3@suse.de> Date: Tue, 3 Jan 2012 20:11:26 +0100 Message-ID: From: Fabio Erculiani Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] linux-user: improve fake /proc/self/stat making `ps` not segfault. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: riku.voipio@iki.fi, qemu-devel@nongnu.org Ok, I've found the reason, i guess it's a bug. target_argv pointer is placed in bprm->argv; But then target_argv is freed and nullified. loader_exec should just allocate a new char** and copy target_argv. I tried that and it worked. The problem is, where do I free() it? Am i supposed to do it or the TaskState lifecycle matches the executable (so there is no need to free() it) ? -- Fabio Erculiani