* [Qemu-devel] patch vl.c, segfault with "qemu -h"
@ 2007-06-29 18:48 Marion Hakanson
2007-06-29 23:27 ` Thiemo Seufer
0 siblings, 1 reply; 3+ messages in thread
From: Marion Hakanson @ 2007-06-29 18:48 UTC (permalink / raw)
To: qemu-devel
When you run "qemu -h", help() is called with optarg==NULL, which
causes a segfault on my system (Solaris-10U3_x86, 64-bit kernel,
but qemu compiled as 32-bit app, gcc-3.4.5 from blastwave.org).
It's a side-effect of the -r1.315 patch which fixed related segfaults.
The following patch fixes the "-h" segfault, and also appears to yield
the exit value intended by previous folks.
===================================================================
RCS file: /sources/qemu/qemu/vl.c,v
retrieving revision 1.316
diff -u -r1.316 vl.c
--- vl.c 28 Jun 2007 15:14:49 -0000 1.316
+++ vl.c 29 Jun 2007 18:40:57 -0000
@@ -6712,7 +6712,7 @@
#endif
DEFAULT_GDBSTUB_PORT,
"/tmp/qemu.log");
- exit(strcmp(optarg, "?"));
+ exit((optarg != NULL) && strcmp(optarg, "?"));
}
#define HAS_ARG 0x0001
===================================================================
Regards,
Marion
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] patch vl.c, segfault with "qemu -h"
2007-06-29 18:48 [Qemu-devel] patch vl.c, segfault with "qemu -h" Marion Hakanson
@ 2007-06-29 23:27 ` Thiemo Seufer
2007-06-30 0:08 ` Marion Hakanson
0 siblings, 1 reply; 3+ messages in thread
From: Thiemo Seufer @ 2007-06-29 23:27 UTC (permalink / raw)
To: Marion Hakanson; +Cc: qemu-devel
Marion Hakanson wrote:
> When you run "qemu -h", help() is called with optarg==NULL, which
> causes a segfault on my system (Solaris-10U3_x86, 64-bit kernel,
> but qemu compiled as 32-bit app, gcc-3.4.5 from blastwave.org).
> It's a side-effect of the -r1.315 patch which fixed related segfaults.
>
> The following patch fixes the "-h" segfault, and also appears to yield
> the exit value intended by previous folks.
Thanks, I committed a fix which I hope is better.
Thiemo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] patch vl.c, segfault with "qemu -h"
2007-06-29 23:27 ` Thiemo Seufer
@ 2007-06-30 0:08 ` Marion Hakanson
0 siblings, 0 replies; 3+ messages in thread
From: Marion Hakanson @ 2007-06-30 0:08 UTC (permalink / raw)
To: Thiemo Seufer; +Cc: qemu-devel
ths@networkno.de said:
>> The following patch fixes the "-h" segfault, and also appears to yield
>> the exit value intended by previous folks.
>
> Thanks, I committed a fix which I hope is better.
Yes, good patch. More thorough. Thanks for the note.
Marion
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-06-30 0:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-29 18:48 [Qemu-devel] patch vl.c, segfault with "qemu -h" Marion Hakanson
2007-06-29 23:27 ` Thiemo Seufer
2007-06-30 0:08 ` Marion Hakanson
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.