<div dir="ltr">I found this code in glz_encoder.c in spice-server:<div>

<pre style="padding:0px;margin:0px;color:rgb(0,0,0);font-size:13.3333px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><code>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
}</code></pre>

<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 13, 2018 at 10:04 PM, Frediano Ziglio <span dir="ltr"><<a href="mailto:fziglio@redhat.com" target="_blank">fziglio@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> Hi all,<br>
<br>
> Sorry to be a bother.<br>
<br>
> After a long time running of glz encode&decode (approx. 4hrs), I came across<br>
> this error.<br>
<br>
</span><span class="">> The higher bits (> 24) of the image id is truncated, which makes dist less<br>
</span>> than id . This error seems to happen when the dist across (1<<24)<br>
<br>
<br>
Is normal that dist is less then id.<br>
The id, as far as I know, is incremented from 0 and is a 64 bit, not<br>
supposed to overflow, is truncated to get the slot and should not be a<br>
problem. The same check "w->images[slot]-><a href="http://hdr.id" rel="noreferrer" target="_blank">hdr.id</a> == id - dist" is done in<br>
wait_for_image which should return TRUE and so "image && image-><a href="http://hdr.id" rel="noreferrer" target="_blank">hdr.id</a> == wait->id"<br>
should be true.<br>
<br>
Could be that g_coroutine_condition_wait returned FALSE? I think that just calling<br>
SPICE_DEBUG is a bug.<br>
<div class="HOEnZb"><div class="h5"><br>
> Can you help me solve this problem?<br>
> Many thanks.<br>
<br>
> Best regards,<br>
> Zhongqiang Huang<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">Frediano<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Zhongqiang Huang</div><div>Department of Cognitive Science, Xiamen University, China</div><div>Tel: +86 137-7993-0982</div></div></div></div></div>
</div>