Odin
Odin copied to clipboard
Compiler hang on self referencing struct JsonSchema
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
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.