Received: from eggs.gnu.org ([2001:4830:134:3::10]:42052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIDbV-0002uJ-Pb for qemu-devel@nongnu.org; Mon, 02 Feb 2015 04:47:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIDbS-0001eE-Ex for qemu-devel@nongnu.org; Mon, 02 Feb 2015 04:47:37 -0500 Received: from mail-pa0-x234.google.com ([2607:f8b0:400e:c03::234]:52337) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIDbS-0001dr-71 for qemu-devel@nongnu.org; Mon, 02 Feb 2015 04:47:34 -0500 Received: by mail-pa0-f52.google.com with SMTP id kx10so80284937pab.11 for ; Mon, 02 Feb 2015 01:47:32 -0800 (PST) Sender: Hitoshi Mitake Date: Mon, 02 Feb 2015 18:47:27 +0900 Message-ID: <87zj8wprv4.wl%mitake.hitoshi@lab.ntt.co.jp> From: Hitoshi Mitake In-Reply-To: References: <1421917694-6824-1-git-send-email-mitake.hitoshi@lab.ntt.co.jp> <1421917694-6824-5-git-send-email-mitake.hitoshi@lab.ntt.co.jp> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Subject: Re: [Qemu-devel] [PATCH v2 4/4] linux-user: initialize progname with error_set_progname() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Hitoshi Mitake , Riku Voipio , QEMU Developers , mitake.hitoshi@gmail.com, Markus Armbruster Hi Peter, Sorry for my late reply. At Thu, 22 Jan 2015 10:07:27 +0000, Peter Maydell wrote: > > On 22 January 2015 at 09:08, Hitoshi Mitake > wrote: > > Calling error_get_progname() in the context of qemu-x86_64 can cause > > segmentation fault because linux-user/main.c doesn't initialize its > > progname with error_set_progname(). This patch adds the > > initialization. > > > > Currently, the missing call of error_set_progname() doesn't cause any > > problems because qemu-x86_64 doesn't use error_get_progname(). This > > patch is a proactive action. > > I don't think this patch is right. The *-user binaries don't > (and should not) use the qemu-error infrastructure (they don't > have the monitor or any of the other stuff that uses). Code > which tries to use error_get_progname() in *-user would be > broken. I just thought linux-user would be a potential user of the qemu-error infrastructure because it is liked with util/qemu-error.o. Actually, the changes of the patch (let linux-user/main.c include "qemu/error-report.h" and call error_get_progname()) didn't cause any problems. But I'm not familiar with linux-user. If the command should never be a user of the error infrastructure, I'd like to drop this patch, of course. Thanks, Hitoshi