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

Segfault when compiling wrong program #9702

Closed
codename68 opened this issue Oct 3, 2013 · 1 comment
Closed

Segfault when compiling wrong program #9702

codename68 opened this issue Oct 3, 2013 · 1 comment

Comments

@codename68
Copy link

The compiler segfaults on the following program:

struct X { field: Option<X> }

fn main() { let x = X { field: None }; }

Surprisingly, the following program successfully compiles:

struct X { field: Option<X> }

fn main(){}
@alexcrichton
Copy link
Member

Thanks for the report! I believe that this is a duplicate of #3779, however. The segfault is because of stack overflow, and both programs should indeed just get outright rejected from the compiler.

flip1995 pushed a commit to flip1995/rust that referenced this issue Dec 29, 2022
flip1995 pushed a commit to flip1995/rust that referenced this issue Dec 29, 2022
add [`permissions_set_readonly_false`] rust-lang#9702

Add slight modification on [this PR](rust-lang/rust-clippy#9744).

---

changelog: New lint [`permissions_set_readonly_false`]
[rust-lang#10063](rust-lang/rust-clippy#10063)
<!-- changelog_checked -->
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