[PATCH] D147890: Fix sysvhash function
Nathan Sidwell via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 14 12:47:39 PDT 2023
urnathan marked 5 inline comments as done.
urnathan added a comment.
In D147890#4260002 <https://reviews.llvm.org/D147890#4260002>, @MaskRay wrote:
>
> Thanks for the patch! The generic ABI code fragment may have an oversight.
> When `long` represents a 64-bit integer, elf_hash((const unsigned char *)"\xff\x0f\x0f\x0f\x0f\x0f\x12") returns 0x100000002, larger than UINT32_MAX.
Yeah, I noticed that too, but the original algorithm was when long was always 32 bits and uint32_t and friends either didn't exist or were very rare. (can't respond to the gabi link you provided).
Anyway, adding your testcase.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147890/new/
https://reviews.llvm.org/D147890
More information about the llvm-commits
mailing list