[Spice-devel] bad id bug in glz decoder
Usepr Xf
useprxf at gmail.com
Mon Apr 23 09:27:11 UTC 2018
I found this code in glz_encoder.c in spice-server:
static inline void encode_64(Encoder *encoder, uint64_t word)
{
encode_32(encoder, (uint32_t)(word >> 32));
encode_32(encoder, (uint32_t)(word & 0xffffff)); // <----- is it
wrong? 0xffffff should be deleted
}
On Fri, Apr 13, 2018 at 10:04 PM, Frediano Ziglio <fziglio at redhat.com>
wrote:
> > Hi all,
>
> > Sorry to be a bother.
>
> > After a long time running of glz encode&decode (approx. 4hrs), I came
> across
> > this error.
>
> > The higher bits (> 24) of the image id is truncated, which makes dist
> less
> > than id . This error seems to happen when the dist across (1<<24)
>
>
> Is normal that dist is less then id.
> The id, as far as I know, is incremented from 0 and is a 64 bit, not
> supposed to overflow, is truncated to get the slot and should not be a
> problem. The same check "w->images[slot]->hdr.id == id - dist" is done in
> wait_for_image which should return TRUE and so "image && image->hdr.id ==
> wait->id"
> should be true.
>
> Could be that g_coroutine_condition_wait returned FALSE? I think that just
> calling
> SPICE_DEBUG is a bug.
>
> > Can you help me solve this problem?
> > Many thanks.
>
> > Best regards,
> > Zhongqiang Huang
>
> Frediano
>
--
Zhongqiang Huang
Department of Cognitive Science, Xiamen University, China
Tel: +86 137-7993-0982
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180423/cb82326d/attachment.html>
More information about the Spice-devel
mailing list