Odin icon indicating copy to clipboard operation
Odin copied to clipboard

Compiler hang on self referencing struct JsonSchema

Open blep opened this issue 4 months ago • 1 comments

Compiling the following code cause the compiler to hang and never exit, printing nothing:

package odin_bug

JsonSchema :: struct {
    items: Maybe(JsonSchema), // For "array" type
}

main :: proc() {
}

odin version dev-2025-08-nightly:accdd7c

blep avatar Aug 11 '25 08:08 blep

Repro works. I've tried tracking down the issue, it seems like a futex wait hanging when attempting to call type_set_offsets in nested calls within the same thread, due to failure of detecting the invalid recursive type definition.

Creativty avatar Aug 12 '25 12:08 Creativty