* [Qemu-devel] '-usb' regressed by 49d2e648 ("machine: remove qemu_machine_opts global list")
@ 2014-12-23 22:12 Laszlo Ersek
2014-12-24 9:30 ` Paolo Bonzini
2014-12-24 11:45 ` Marcel Apfelbaum
0 siblings, 2 replies; 6+ messages in thread
From: Laszlo Ersek @ 2014-12-23 22:12 UTC (permalink / raw)
To: Marcel Apfelbaum; +Cc: qemu devel list
Apologies if this problem is known. After building qemu at ab0302ee:
$ qemu-system-x86_64 -usb
qemu-system-x86_64: util/qemu-option.c:387: qemu_opt_get_bool_helper: Assertion `opt->desc && opt->desc->type == QEMU_OPT_BOOL' failed.
The stack is
#0 0x00007ffff1e945c9 in raise () from /lib64/libc.so.6
#1 0x00007ffff1e95cd8 in abort () from /lib64/libc.so.6
#2 0x00007ffff1e8d536 in __assert_fail_base () from /lib64/libc.so.6
#3 0x00007ffff1e8d5e2 in __assert_fail () from /lib64/libc.so.6
#4 0x00005555559660f5 in qemu_opt_get_bool_helper (opts=0x5555562b51f0, name=0x55555598a4af "usb", defval=false, del=false) at util/qemu-option.c:387
#5 0x000055555596614d in qemu_opt_get_bool (opts=0x5555562b51f0, name=0x55555598a4af "usb", defval=false) at util/qemu-option.c:397
#6 0x0000555555715d23 in usb_enabled (default_usb=false) at vl.c:1002
#7 0x000055555568d7bc in pc_init1 (machine=0x5555562c22f0, pci_enabled=1, kvmclock_enabled=1) at hw/i386/pc_piix.c:277
#8 0x000055555568d94e in pc_init_pci (machine=0x5555562c22f0) at hw/i386/pc_piix.c:308
#9 0x000055555571e8d4 in main (argc=2, argv=0x7fffffffd1d8, envp=0x7fffffffd1f0) at vl.c:4217
Bisection fingers 49d2e648.
This is very visible with libvirt.
Thanks
Laszlo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] '-usb' regressed by 49d2e648 ("machine: remove qemu_machine_opts global list")
2014-12-23 22:12 [Qemu-devel] '-usb' regressed by 49d2e648 ("machine: remove qemu_machine_opts global list") Laszlo Ersek
@ 2014-12-24 9:30 ` Paolo Bonzini
2014-12-24 9:51 ` Gonglei
2014-12-24 11:03 ` Laszlo Ersek
2014-12-24 11:45 ` Marcel Apfelbaum
1 sibling, 2 replies; 6+ messages in thread
From: Paolo Bonzini @ 2014-12-24 9:30 UTC (permalink / raw)
To: Laszlo Ersek, Marcel Apfelbaum; +Cc: qemu devel list
On 23/12/2014 23:12, Laszlo Ersek wrote:
> Apologies if this problem is known. After building qemu at ab0302ee:
>
> $ qemu-system-x86_64 -usb
>
> qemu-system-x86_64: util/qemu-option.c:387: qemu_opt_get_bool_helper: Assertion `opt->desc && opt->desc->type == QEMU_OPT_BOOL' failed.
Does this work?
diff --git a/util/qemu-option.c b/util/qemu-option.c
index a708241..4f1f86a 100644
--- a/util/qemu-option.c
+++ b/util/qemu-option.c
@@ -384,7 +384,7 @@ static bool qemu_opt_get_bool_helper(QemuOpts *opts,
const char *name,
}
return ret;
}
- assert(opt->desc && opt->desc->type == QEMU_OPT_BOOL);
+ assert(!opt->desc || opt->desc->type == QEMU_OPT_BOOL);
ret = opt->value.boolean;
if (del) {
qemu_opt_del_all(opts, name);
@@ -420,7 +420,7 @@ static uint64_t qemu_opt_get_number_helper(QemuOpts
*opts, const char *name,
}
return ret;
}
- assert(opt->desc && opt->desc->type == QEMU_OPT_NUMBER);
+ assert(!opt->desc || opt->desc->type == QEMU_OPT_NUMBER);
ret = opt->value.uint;
if (del) {
qemu_opt_del_all(opts, name);
@@ -457,7 +457,7 @@ static uint64_t qemu_opt_get_size_helper(QemuOpts
*opts, const char *name,
}
return ret;
}
- assert(opt->desc && opt->desc->type == QEMU_OPT_SIZE);
+ assert(!opt->desc || opt->desc->type == QEMU_OPT_SIZE);
ret = opt->value.uint;
if (del) {
qemu_opt_del_all(opts, name);
Paolo
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] '-usb' regressed by 49d2e648 ("machine: remove qemu_machine_opts global list")
2014-12-24 9:30 ` Paolo Bonzini
@ 2014-12-24 9:51 ` Gonglei
2014-12-24 11:03 ` Laszlo Ersek
1 sibling, 0 replies; 6+ messages in thread
From: Gonglei @ 2014-12-24 9:51 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Laszlo Ersek, qemu devel list, Marcel Apfelbaum
On 2014/12/24 17:30, Paolo Bonzini wrote:
>
>
> On 23/12/2014 23:12, Laszlo Ersek wrote:
>> Apologies if this problem is known. After building qemu at ab0302ee:
>>
>> $ qemu-system-x86_64 -usb
>>
>> qemu-system-x86_64: util/qemu-option.c:387: qemu_opt_get_bool_helper: Assertion `opt->desc && opt->desc->type == QEMU_OPT_BOOL' failed.
>
> Does this work?
>
> diff --git a/util/qemu-option.c b/util/qemu-option.c
> index a708241..4f1f86a 100644
> --- a/util/qemu-option.c
> +++ b/util/qemu-option.c
> @@ -384,7 +384,7 @@ static bool qemu_opt_get_bool_helper(QemuOpts *opts,
> const char *name,
> }
> return ret;
> }
> - assert(opt->desc && opt->desc->type == QEMU_OPT_BOOL);
> + assert(!opt->desc || opt->desc->type == QEMU_OPT_BOOL);
> ret = opt->value.boolean;
> if (del) {
> qemu_opt_del_all(opts, name);
> @@ -420,7 +420,7 @@ static uint64_t qemu_opt_get_number_helper(QemuOpts
> *opts, const char *name,
> }
> return ret;
> }
> - assert(opt->desc && opt->desc->type == QEMU_OPT_NUMBER);
> + assert(!opt->desc || opt->desc->type == QEMU_OPT_NUMBER);
> ret = opt->value.uint;
> if (del) {
> qemu_opt_del_all(opts, name);
> @@ -457,7 +457,7 @@ static uint64_t qemu_opt_get_size_helper(QemuOpts
> *opts, const char *name,
> }
> return ret;
> }
> - assert(opt->desc && opt->desc->type == QEMU_OPT_SIZE);
> + assert(!opt->desc || opt->desc->type == QEMU_OPT_SIZE);
> ret = opt->value.uint;
> if (del) {
> qemu_opt_del_all(opts, name);
>
> Paolo
>
Nice~
Regards,
-Gonglei
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] '-usb' regressed by 49d2e648 ("machine: remove qemu_machine_opts global list")
2014-12-24 9:30 ` Paolo Bonzini
2014-12-24 9:51 ` Gonglei
@ 2014-12-24 11:03 ` Laszlo Ersek
2014-12-24 11:55 ` Paolo Bonzini
1 sibling, 1 reply; 6+ messages in thread
From: Laszlo Ersek @ 2014-12-24 11:03 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu devel list, Marcel Apfelbaum
On 12/24/14 10:30, Paolo Bonzini wrote:
>
>
> On 23/12/2014 23:12, Laszlo Ersek wrote:
>> Apologies if this problem is known. After building qemu at ab0302ee:
>>
>> $ qemu-system-x86_64 -usb
>>
>> qemu-system-x86_64: util/qemu-option.c:387: qemu_opt_get_bool_helper: Assertion `opt->desc && opt->desc->type == QEMU_OPT_BOOL' failed.
>
> Does this work?
>
> diff --git a/util/qemu-option.c b/util/qemu-option.c
> index a708241..4f1f86a 100644
> --- a/util/qemu-option.c
> +++ b/util/qemu-option.c
> @@ -384,7 +384,7 @@ static bool qemu_opt_get_bool_helper(QemuOpts *opts,
> const char *name,
> }
> return ret;
> }
> - assert(opt->desc && opt->desc->type == QEMU_OPT_BOOL);
> + assert(!opt->desc || opt->desc->type == QEMU_OPT_BOOL);
> ret = opt->value.boolean;
> if (del) {
> qemu_opt_del_all(opts, name);
> @@ -420,7 +420,7 @@ static uint64_t qemu_opt_get_number_helper(QemuOpts
> *opts, const char *name,
> }
> return ret;
> }
> - assert(opt->desc && opt->desc->type == QEMU_OPT_NUMBER);
> + assert(!opt->desc || opt->desc->type == QEMU_OPT_NUMBER);
> ret = opt->value.uint;
> if (del) {
> qemu_opt_del_all(opts, name);
> @@ -457,7 +457,7 @@ static uint64_t qemu_opt_get_size_helper(QemuOpts
> *opts, const char *name,
> }
> return ret;
> }
> - assert(opt->desc && opt->desc->type == QEMU_OPT_SIZE);
> + assert(!opt->desc || opt->desc->type == QEMU_OPT_SIZE);
> ret = opt->value.uint;
> if (del) {
> qemu_opt_del_all(opts, name);
Tested-by: Laszlo Ersek <lersek@redhat.com>
Thanks!
Laszlo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] '-usb' regressed by 49d2e648 ("machine: remove qemu_machine_opts global list")
2014-12-24 11:03 ` Laszlo Ersek
@ 2014-12-24 11:55 ` Paolo Bonzini
0 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2014-12-24 11:55 UTC (permalink / raw)
To: Laszlo Ersek; +Cc: qemu devel list, Marcel Apfelbaum
On 24/12/2014 12:03, Laszlo Ersek wrote:
> On 12/24/14 10:30, Paolo Bonzini wrote:
>>
>>
>> On 23/12/2014 23:12, Laszlo Ersek wrote:
>>> Apologies if this problem is known. After building qemu at ab0302ee:
>>>
>>> $ qemu-system-x86_64 -usb
>>>
>>> qemu-system-x86_64: util/qemu-option.c:387: qemu_opt_get_bool_helper: Assertion `opt->desc && opt->desc->type == QEMU_OPT_BOOL' failed.
>>
>> Does this work?
>>
>> diff --git a/util/qemu-option.c b/util/qemu-option.c
>> index a708241..4f1f86a 100644
>> --- a/util/qemu-option.c
>> +++ b/util/qemu-option.c
>> @@ -384,7 +384,7 @@ static bool qemu_opt_get_bool_helper(QemuOpts *opts,
>> const char *name,
>> }
>> return ret;
>> }
>> - assert(opt->desc && opt->desc->type == QEMU_OPT_BOOL);
>> + assert(!opt->desc || opt->desc->type == QEMU_OPT_BOOL);
>> ret = opt->value.boolean;
>> if (del) {
>> qemu_opt_del_all(opts, name);
>> @@ -420,7 +420,7 @@ static uint64_t qemu_opt_get_number_helper(QemuOpts
>> *opts, const char *name,
>> }
>> return ret;
>> }
>> - assert(opt->desc && opt->desc->type == QEMU_OPT_NUMBER);
>> + assert(!opt->desc || opt->desc->type == QEMU_OPT_NUMBER);
>> ret = opt->value.uint;
>> if (del) {
>> qemu_opt_del_all(opts, name);
>> @@ -457,7 +457,7 @@ static uint64_t qemu_opt_get_size_helper(QemuOpts
>> *opts, const char *name,
>> }
>> return ret;
>> }
>> - assert(opt->desc && opt->desc->type == QEMU_OPT_SIZE);
>> + assert(!opt->desc || opt->desc->type == QEMU_OPT_SIZE);
>> ret = opt->value.uint;
>> if (del) {
>> qemu_opt_del_all(opts, name);
>
> Tested-by: Laszlo Ersek <lersek@redhat.com>
Hmm, it doesn't work though. parse_option_bool is not called.
Something for new year I guess.
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] '-usb' regressed by 49d2e648 ("machine: remove qemu_machine_opts global list")
2014-12-23 22:12 [Qemu-devel] '-usb' regressed by 49d2e648 ("machine: remove qemu_machine_opts global list") Laszlo Ersek
2014-12-24 9:30 ` Paolo Bonzini
@ 2014-12-24 11:45 ` Marcel Apfelbaum
1 sibling, 0 replies; 6+ messages in thread
From: Marcel Apfelbaum @ 2014-12-24 11:45 UTC (permalink / raw)
To: Laszlo Ersek, Marcel Apfelbaum; +Cc: qemu devel list
On 12/24/2014 12:12 AM, Laszlo Ersek wrote:
> Apologies if this problem is known. After building qemu at ab0302ee:
The problem is not known.
Thanks for finding it and testing it!
Marcel
>
> $ qemu-system-x86_64 -usb
>
> qemu-system-x86_64: util/qemu-option.c:387: qemu_opt_get_bool_helper: Assertion `opt->desc && opt->desc->type == QEMU_OPT_BOOL' failed.
>
> The stack is
>
> #0 0x00007ffff1e945c9 in raise () from /lib64/libc.so.6
> #1 0x00007ffff1e95cd8 in abort () from /lib64/libc.so.6
> #2 0x00007ffff1e8d536 in __assert_fail_base () from /lib64/libc.so.6
> #3 0x00007ffff1e8d5e2 in __assert_fail () from /lib64/libc.so.6
> #4 0x00005555559660f5 in qemu_opt_get_bool_helper (opts=0x5555562b51f0, name=0x55555598a4af "usb", defval=false, del=false) at util/qemu-option.c:387
> #5 0x000055555596614d in qemu_opt_get_bool (opts=0x5555562b51f0, name=0x55555598a4af "usb", defval=false) at util/qemu-option.c:397
> #6 0x0000555555715d23 in usb_enabled (default_usb=false) at vl.c:1002
> #7 0x000055555568d7bc in pc_init1 (machine=0x5555562c22f0, pci_enabled=1, kvmclock_enabled=1) at hw/i386/pc_piix.c:277
> #8 0x000055555568d94e in pc_init_pci (machine=0x5555562c22f0) at hw/i386/pc_piix.c:308
> #9 0x000055555571e8d4 in main (argc=2, argv=0x7fffffffd1d8, envp=0x7fffffffd1f0) at vl.c:4217
>
> Bisection fingers 49d2e648.
>
> This is very visible with libvirt.
>
> Thanks
> Laszlo
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-12-24 11:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-23 22:12 [Qemu-devel] '-usb' regressed by 49d2e648 ("machine: remove qemu_machine_opts global list") Laszlo Ersek
2014-12-24 9:30 ` Paolo Bonzini
2014-12-24 9:51 ` Gonglei
2014-12-24 11:03 ` Laszlo Ersek
2014-12-24 11:55 ` Paolo Bonzini
2014-12-24 11:45 ` Marcel Apfelbaum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).