Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler segfault when creating recursive parameterized types #4655

Open
devNegative-asm opened this issue Jan 4, 2025 · 0 comments
Open

Comments

@devNegative-asm
Copy link

Context

        Odin:    dev-2025-01:f5e5c9767
        OS:      Ubuntu 22.04.5 LTS, Linux 6.8.0-50-generic
        CPU:     13th Gen Intel(R) Core(TM) i9-13900KF
        RAM:     64155 MiB
        Backend: LLVM 14.0.0

Expected Behavior

Either an error message detecting the cycle and emitting an error, or should compile

Current Behavior

Compiler crashes with a segmentation fault

Failure Information (for bugs)

Running with gdb showed large stack trace. suspecting stack overflow from infinite recursion loop

Steps to Reproduce

Run odin build on the following source

A :: struct($T: int, $U: int) {
    b: union #no_nil {
        ^B(T,U),
        ^C(T,U)
    }
}
B :: struct($T: int, $U: int) {
    a: E(T,U),
    b: ^[U * 2]u8,
}
C :: struct($T: int, $U: int) {
    a: A(T,U),
    d: [T]E(T,U)
}
D :: struct($T: int, $U: int) {
    b: A(T,U),
}
E :: union($T: int, $U: int) {
    ^C(T,U),
    ^D(T,U)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant