Skip to content

Handle map with circular dependency freezes compiler most of the time #6375

@semirix

Description

@semirix

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

Odin:    dev-2026-03:1a5126c
OS:      macOS Tahoe 26.3.0 (build 25D125, kernel 25.3.0)
CPU:     Apple M2 Max
RAM:     65536 MiB
Backend: LLVM 21.1.8

This behaviour has also been observed on the dev-2026-02 tag as well.

Expected Behavior

The following two files should compile:

entity.odin

package main

import hm "core:container/handle_map"

Entity_Handle :: hm.Handle32

Entity :: struct {
	handle: Entity_Handle,
	process: proc(world: ^World),
}

main.odin

package main

import hm "core:container/handle_map"

World :: struct {
	entities: hm.Dynamic_Handle_Map(Entity, Entity_Handle),
}

main :: proc() {
	world := World{}
	hm.dynamic_init(&world.entities, context.allocator)
}

Current Behavior

The compiler freezes and does nothing. Very occasionally, it will work, but most of the time it freezes.

Failure Information (for bugs)

It seems to be stuck in a loop. There seems to be some nondeterministic element at play, because one in maybe thirty times when I rerun the build it will compile instantly.

Steps to Reproduce

  1. Add the code above into a directory
  2. Run odin build <directory>

Failure Logs

No logs due to freeze.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions