Re: undefined behaviour in hamt.c

2022-04-14 Thread Bruno Haible
Marc Nieper-Wißkirchen wrote: > This can easily be fixed, see the attached diff. Could you patch the > upstream version and repeat the clang test? The patch looks good. Can you please push it yourself? I'll then repeat the clang UBsan test. Bruno

Re: undefined behaviour in hamt.c

2022-04-14 Thread Marc Nieper-Wißkirchen
Hi Bruno, thanks for exhibiting this. The complaint by the UB sanitizer is correct. Although the code won't use the 64-bit value shifted by 65, it is technically UB. When I wrote the code, I erroneously assumed that it would not be UB, but that the result of the shift would be implementation-depen