Markus Armbruster <[email protected]> writes:

> This commit regresses error message quality from
>
>     $ qemu-system-x86_64 -nodefaults -display none -object 
> secret,id=sec0,data=letmein,format=raw,foo=bar
>     qemu-system-x86_64: -object 
> secret,id=sec0,data=letmein,format=raw,foo=bar: Property '.foo' not found
>
> to just
>
>     qemu-system-x86_64: Property '.foo' not found
>
> Clue: cur_loc points to garbage.
>
>     (gdb) p cur_loc
>     $1 = (Location *) 0x7fffffffdc10
>     (gdb) p *cur_loc
>     $2 = {kind = (unknown: 4294958128), num = 32767, 
>       ptr = 0x555555b804a2 <error_report_err+44>, prev = 0x5555565d2770 
> <std_loc>}
>
> Looks like cur_loc is dangling.  Happens when you forget to loc_pop() a
> Location before it dies.  This one is on the stack.
>
> *Might* be release critical.
>
> For comparison, this is how it looks before the patch:
>
>     (gdb) p cur_loc
>     $1 = (Location *) 0x7fffffffdc10
>     (gdb) p *cur_loc
>     $2 = {kind = LOC_CMDLINE, num = 2, ptr = 0x7fffffffe018, prev = 
>         0x5555565d2770 <std_loc>}
>
> Reported-by: Eric Blake <[email protected]>

I think I nailed it.  Preparing patches...

Reply via email to