[Spice-devel] bad id bug in glz decoder
Frediano Ziglio
fziglio at redhat.com
Thu Apr 26 05:53:41 UTC 2018
> Hi Ziglio,
> I was wondering if you have had a chance to look at the email below yet.
> Best regards,
> Zhongqiang Huang
Yes, weird, usually git CC people in the commit message, but see
https://lists.freedesktop.org/archives/spice-devel/2018-April/043230.html
this was acked and merged.
Christophe, should we backport to 0.12.8 ?
Frediano
> On Mon, Apr 23, 2018 at 5:27 PM, Usepr Xf < useprxf at gmail.com > wrote:
> > 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
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180426/ebf1c794/attachment-0001.html>
More information about the Spice-devel
mailing list