• Ozan Tezcan's avatar
    Some fixes to undefined behaviour bugs taken from (#9601) · 052e01e7
    Ozan Tezcan authored
    **Signed integer overflow.** Although, signed overflow issue can be problematic time to time
    and change how compiler generates code, current findings mostly about signed shift or simple
    addition overflow. For most platforms Redis can be compiled for, this wouldn't cause any issue
    as far as I can tell (checked generated code on godbolt.org).
    
    UB means nothing guaranteed and risky to reason about program behavior but I don't think any
    of the fixes here worth backporting. As sanitizers are now part of the CI, preventing new issues
    will be the real benefit.
    
    partial cherry pick from commit b91d8b28
    The bug in BITFIELD seems to affect 12.2.1 used on Alpine
    052e01e7
bitops.c 41.9 KB