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

Adding #no_nil to an enum segfaults the compiler (instead of reporting an error) #3355

Closed
dogue opened this issue Mar 31, 2024 · 2 comments
Closed

Comments

@dogue
Copy link

dogue commented Mar 31, 2024

Context

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

  • Operating System & Odin Version: Linux 6.7.9-arch1-1, Odin version dev-2024-03
  • Please paste odin report output:
        Odin:    dev-2024-03
        OS:      Arch Linux, Linux 6.7.9-arch1-1
        CPU:     AMD Ryzen 5 3600 6-Core Processor
        RAM:     32015 MiB
        Backend: LLVM 14.0.6

Expected Behavior

I would expect the compiler to report an error for an invalid attribute.

Current Behavior

The compiler experiences a segmentation fault when attempting to compile the example code below.

Failure Information (for bugs)

Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.

Steps to Reproduce

Here is a complete example to reproduce:

package no_nil_enum

import "core:fmt"

Enum :: enum #no_nil {A, B, C}

main :: proc() {
	fmt.println("Hellope")
}

Failure Logs

✦ ~/Projects/Odin/nonilenum
❯ odin build .
zsh: segmentation fault (core dumped)  odin build .
@dogue
Copy link
Author

dogue commented Mar 31, 2024

Fairly minor issue in the grand scheme of things and entirely my fault. Troubleshooting was as frustrating as you'd expect though.

@gingerBill
Copy link
Member

This has been fixed in b47d73c

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

2 participants