Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,10 @@ static jl_module_t *jl_new_module__(jl_sym_t *name, jl_module_t *parent)
m->parent = parent ? parent : m;
m->istopmod = 0;
m->uuid = uuid_zero;
static unsigned int mcounter; // simple counter backup, in case hrtime is not incrementing
static _Atomic(unsigned int) mcounter; // simple counter backup, in case hrtime is not incrementing
unsigned int count = jl_atomic_fetch_add_relaxed(&mcounter, 1);
// TODO: this is used for ir decompression and is liable to hash collisions so use more of the bits
m->build_id.lo = bitmix(jl_hrtime() + (++mcounter), jl_rand());
m->build_id.lo = bitmix(jl_hrtime() + count, jl_rand());
if (!m->build_id.lo)
m->build_id.lo++; // build id 0 is invalid
m->build_id.hi = ~(uint64_t)0;
Expand Down