From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2lFR-0006Mj-84 for qemu-devel@nongnu.org; Wed, 29 Feb 2012 10:15:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2lFI-0003ib-Du for qemu-devel@nongnu.org; Wed, 29 Feb 2012 10:15:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:15036) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2lFH-0003i7-VD for qemu-devel@nongnu.org; Wed, 29 Feb 2012 10:15:12 -0500 From: Kevin Wolf Date: Wed, 29 Feb 2012 16:18:08 +0100 Message-Id: <1330528688-21996-28-git-send-email-kwolf@redhat.com> In-Reply-To: <1330528688-21996-1-git-send-email-kwolf@redhat.com> References: <1330528688-21996-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 27/27] qemu-img: fix segment fault when the image format is qed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Zhi Yong Wu [root@f15 qemu]# qemu-img info /home/zwu/work/misc/rh6.img image: /home/zwu/work/misc/rh6.img file format: qed virtual size: 4.0G (4294967296 bytes) disk size: 1.2G cluster_size: 65536 Segmentation fault (core dumped) Today when i were fixing another issue, i found this issue; After simple investigation, i found that the required clock vm_clock is not created for qemu tool. Signed-off-by: Zhi Yong Wu Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- qemu-img.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index c4bcf41..8df3564 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1655,6 +1655,8 @@ int main(int argc, char **argv) cmdname = argv[1]; argc--; argv++; + qemu_init_main_loop(); + /* find the command */ for(cmd = img_cmds; cmd->name != NULL; cmd++) { if (!strcmp(cmdname, cmd->name)) { -- 1.7.6.5