Re: [PATCH RESEND v2 1/2] migration/xbzrle: use ctz64 to avoid undefined result

2023-03-15 Thread Juan Quintela
Matheus Tavares Bernardino wrote: > __builtin_ctzll() produces undefined results when the argument is 0. > This can be seen through test-xbzrle, which produces the following > warning: > > ../migration/xbzrle.c:265: runtime error: passing zero to ctz(), which is not > a valid argument > >

Re: [PATCH RESEND v2 1/2] migration/xbzrle: use ctz64 to avoid undefined result

2023-03-15 Thread Dr. David Alan Gilbert
* Matheus Tavares Bernardino (quic_mathb...@quicinc.com) wrote: > __builtin_ctzll() produces undefined results when the argument is 0. > This can be seen through test-xbzrle, which produces the following > warning: > > ../migration/xbzrle.c:265: runtime error: passing zero to ctz(), which is not

[PATCH RESEND v2 1/2] migration/xbzrle: use ctz64 to avoid undefined result

2023-03-13 Thread Matheus Tavares Bernardino
__builtin_ctzll() produces undefined results when the argument is 0. This can be seen through test-xbzrle, which produces the following warning: ../migration/xbzrle.c:265: runtime error: passing zero to ctz(), which is not a valid argument Replace __builtin_ctzll() with our ctz64() wrapper