[clang] [llvm] [Serialization] Use stable hash functions (PR #96136)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 22 14:23:35 PDT 2024


MaskRay wrote:

> I suspect this is the root cause that some modules related test are failing on armv8-quick. It passes with commit [12c0281](https://github.com/llvm/llvm-project/commit/12c0281f8c73bc1aa20d1517357e0e12c3f8bb4e) ([lab.llvm.org/buildbot/#/builders/154/builds/320](https://lab.llvm.org/buildbot/#/builders/154/builds/320)) and fails with [b39f523](https://github.com/llvm/llvm-project/commit/b39f523af7601fe1b39b32568b705fe844d70057) ([lab.llvm.org/buildbot/#/builders/154/builds/322](https://lab.llvm.org/buildbot/#/builders/154/builds/322)). I feel [b39f523](https://github.com/llvm/llvm-project/commit/b39f523af7601fe1b39b32568b705fe844d70057) is not related to tests.
>
> Also hit it on 32-bit x86; filed https://github.com/llvm/llvm-project/issues/96379 before I managed to bisect it.

Thanks for the reports. Reproducible with `-DLLVM_TARGETS_TO_BUILD=host -DLLVM_ENABLE_PROJECTS='clang;lld' -DCMAKE_BUILD_TYPE=Debug -DCMAKE_{C,CXX}_FLAGS=-m32 -DCMAKE_{EXE,SHARED}_LINKER_FLAGS=-m32`.

The content hash unintentionally used `size_t`, which is 32-bit and this change caused a mismatch. Fixed by f3005d5b86ca947977f6056552b2a4648b9f0460

https://github.com/llvm/llvm-project/pull/96136


More information about the cfe-commits mailing list