[PATCH] D147890: Fix sysvhash function

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 12 00:49:22 PDT 2023


MaskRay added inline comments.


================
Comment at: llvm/unittests/Object/ELFTest.cpp:289
+                    "\xf0\x9f\x8c\x88"), 0xf7603f3U);
+}
----------------
Here is a nice test case (all alphanumeric characters!) to trigger an overflow issue for the generic ABI function. `elf_hash((const unsigned char *)"ZZZZZW9p")) == 100000000` (https://maskray.me/blog/2023-04-12-elf-hash-function)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147890/new/

https://reviews.llvm.org/D147890



More information about the llvm-commits mailing list