[Spice-devel] [spice-gtk] vmcstream, gtask: Fix crash when trying to use webdav

Fabiano Fidêncio fabiano at fidencio.org
Tue Mar 22 20:18:45 UTC 2016


On Tue, Mar 22, 2016 at 1:43 PM, Victor Toso <lists at victortoso.com> wrote:
> Interesting that I don't get the crash with remote-viewer, probably
> because the shared-folder is not started by default as it is with spicy.
> I thought it would be interesting to add here.
>
> Acked-by: Victor Toso <victortoso at redhat.com>

Pushed, thanks!

>
> On Tue, Mar 22, 2016 at 01:01:30PM +0100, Pavel Grunt wrote:
>> Ack.
>>
>> Pavel
>>
>> On Mon, 2016-03-21 at 16:02 +0100, Fabiano Fidêncio wrote:
>> > Don't try to get the cancellable from a task that is, for sure
>> > (ensured
>> > by us), NULL. See the backtrace:
>> >
>> >  #0  0x00007ffff29cf250 in g_task_get_cancellable () at
>> > /lib64/libgio-2.0.so.0
>> >  #1  0x00007ffff78a9012 in spice_vmc_input_stream_read_all_async
>> > (stream=<optimized out>, buffer=0x7070f8, count=8,
>> > io_priority=<optimized out>, cancellable=0x7fffcc00a470,
>> > callback=0x7ffff788c190 <client_read_cb>, user_data=0x707b30) at
>> > vmcstream.c:187
>> >  #2  0x00007ffff788c0ab in start_demux (self=0x707b30) at channel-
>> > webdav.c:498
>> >  #3  0x00007ffff2700578 in g_closure_invoke () at /lib64/libgobject-
>> > 2.0.so.0
>> >  #4  0x00007ffff27135f0 in signal_emit_unlocked_R () at
>> > /lib64/libgobject-2.0.so.0
>> >  #5  0x00007ffff271c43c in g_signal_emit_valist () at
>> > /lib64/libgobject-2.0.so.0
>> >  #6  0x00007ffff788acca in emit_main_context (opaque=0x7fffbfffe880)
>> > at gio-coroutine.c:200
>> >  #7  0x00007ffff242bab3 in g_main_context_dispatch () at
>> > /lib64/libglib-2.0.so.0
>> >  #8  0x00007ffff242be60 in g_main_context_iterate.isra () at
>> > /lib64/libglib-2.0.so.0
>> >  #9  0x00007ffff242c182 in g_main_loop_run () at /lib64/libglib-
>> > 2.0.so.0
>> >  #10 0x0000000000405df6 in main (argc=<optimized out>,
>> > argv=<optimized out>) at spicy.c:1897
>> >
>> > It was pointed out during the review and, somehow, missed :-\
>> >
>> > Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
>> > Signed-off-by: Pavel Grunt <pgrunt at redhat.com>
>> > ---
>> >  src/vmcstream.c | 2 --
>> >  1 file changed, 2 deletions(-)
>> >
>> > diff --git a/src/vmcstream.c b/src/vmcstream.c
>> > index 48f9513..8a31a47 100644
>> > --- a/src/vmcstream.c
>> > +++ b/src/vmcstream.c
>> > @@ -184,7 +184,6 @@
>> > spice_vmc_input_stream_read_all_async(GInputStream        *stream,
>> >
>> >      /* no concurrent read permitted by ginputstream */
>> >      g_return_if_fail(self->task == NULL);
>> > -    g_return_if_fail(g_task_get_cancellable(self->task) == NULL);
>> >      self->all = TRUE;
>> >      self->buffer = buffer;
>> >      self->count = count;
>> > @@ -236,7 +235,6 @@
>> > spice_vmc_input_stream_read_async(GInputStream        *stream,
>> >
>> >      /* no concurrent read permitted by ginputstream */
>> >      g_return_if_fail(self->task == NULL);
>> > -    g_return_if_fail(g_task_get_cancellable(self->task) == NULL);
>> >      self->all = FALSE;
>> >      self->buffer = buffer;
>> >      self->count = count;
>> _______________________________________________
>> Spice-devel mailing list
>> Spice-devel at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/spice-devel
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel



-- 
Fabiano Fidêncio


More information about the Spice-devel mailing list