Re: [PATCH spice-gtk v2] vmcstream: set the right result for the task

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 27, 2016 at 03:31:10PM +0200, Fabiano Fidêncio wrote:
> >> diff --git a/src/vmcstream.c b/src/vmcstream.c
> >> index c536f71..32d8b5e 100644
> >> --- a/src/vmcstream.c
> >> +++ b/src/vmcstream.c
> >> @@ -399,9 +399,13 @@ spice_vmc_output_stream_write_finish(GOutputStream *stream,
> >>  {
> >>      SpiceVmcOutputStream *self = SPICE_VMC_OUTPUT_STREAM(stream);
> >>      GAsyncResult *res = g_task_propagate_pointer(G_TASK(simple), error);
> >> +    gssize bytes_written;
> >>
> >>      SPICE_DEBUG("spicevmc write finish");
> >> -    return spice_vmc_write_finish(self->channel, res, error);
> >> +    bytes_written = spice_vmc_write_finish(self->channel, res, error);
> >> +    g_object_unref(res);
> >> +
> >> +    return bytes_written;
> >>  }
> >>
> >>  static void
> >>
> >>
> >> (but this is arguably a slightly different bug which was already existing
> >> before your change).
> >
> > Feel free to squash my patch into your change or push both separately.
> 
> Hmm. With your patch I can see the following critical
> (remote-viewer:18180): GSpice-CRITICAL **:
> spice_vmc_input_stream_read_all_async: assertion 'self->task == NULL'
> failed

I'm quite confused here, my patch is changing
spice_vmc_output_stream_write_finish() and the assert is in
spice_vmc_input_stream_read_all_async(), is this corrupting memory?
And I don't see how not leaking memory should affect self->task being
NULL/concurrent reads on an input stream??

> So, please, let's go for my patch and then we can get back to your
> changes later on.

If you want, but there's something odd/fishy going on, is this easy to
trigger in remote-viewer?

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]