ΒΆvoid set_fixed_execution_hash_seed(
    uint64_t fixed_value)

Description

Override the execution seed with a fixed value. This hashing library uses a per-execution seed designed to change on each run with high probability in order to ensure that the hash codes are not attackable and to ensure that output which is intended to be stable does not rely on the particulars of the hash codes produced. That said, there are use cases where it is important to be able to reproduce *exactly* a specific behavior. To that end, we provide a function which will forcibly set the seed to a fixed value. This must be done at the start of the program, before any hashes are computed. Also, it cannot be undone. This makes it thread-hostile and very hard to use outside of immediately on start of a simple program designed for reproducible behavior.

Declared at: llvm/include/llvm/ADT/Hashing.h:140

Parameters

uint64_t fixed_value