Skip to content

thread 'Worker' has overflowed its stack #14421

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

Closed
tomm2000 opened this issue Mar 27, 2023 · 1 comment · Fixed by #14426
Closed

thread 'Worker' has overflowed its stack #14421

tomm2000 opened this issue Mar 27, 2023 · 1 comment · Fixed by #14426
Labels

Comments

@tomm2000
Copy link

tomm2000 commented Mar 27, 2023

This code crashes rust-analyzer. (thread 'Worker' has overflowed its stack)

pub enum Tree {
  Node(TreeNode),
  Leaf(TreeLeaf),
}

pub struct TreeNode {
  pub depth: usize,
  pub children: [Box<Tree>; 8]
}

pub struct TreeLeaf {
  pub depth: usize,
  pub data: u8
}

pub fn test() {
  let tree = Tree::Leaf(
    TreeLeaf {
      depth: 0,
      data: 0
    }
  );
}

The issue seems to be with the creation of the tree, commenting out the body of the test function stops the error from occurring.

rust-analyzer version (VS-code): v0.3.1451

also tried pre-release version: v0.4.1450, the error still occurs.

@tomm2000 tomm2000 added the C-bug Category: bug label Mar 27, 2023
@Veykril Veykril added A-ty type system / type inference / traits / method resolution I-crash A-mir and removed A-ty type system / type inference / traits / method resolution labels Mar 27, 2023
@Veykril
Copy link
Member

Veykril commented Mar 28, 2023

@HKalbasi this seems to be a MIR problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants