Possible UB here
Comment From: antirez
Yes, I see some problem with that code, not just the UB, but I don't think it was on purpose that the right shift count become negative. I'll check better tomorrow. Thanks.
Comment From: abhi-jha
Not sure if the issue still exists but the code seems to have moved away from that line.
Comment From: oranagra
seems to me that it was this line:
int idx = (hash.bits >> (52-((i+1)*5))) & 0x1f;
but i'm not sure if if did have any UB since we now run UBSAN, and we didn't change that line, see #9601
Comment From: oranagra
ohh, it was fixed in 5a72c5058c