-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.RefactoringIssues related to refactoring toolsIssues related to refactoring toolsgopls/parsingIssues related to parsing / poor parser recovery.Issues related to parsing / poor parser recovery.
Milestone
Description
A struct type with a missing close brace has an StructType.End pos of zero. That means the enclosing nodes such as ReturnStmt may also have a computed End that is zero, or perhaps slightly larger:
I believe this is the root cause of at least some of the many gopls crashes recorded in #64547.
Ultimately this is a problem of parser error recovery. We need to establish the invariants that:
- all tree nodes have valid Pos/End positions; and
- all tree nodes have nested Pos/End subranges (with a possible exception for the func keyword in FuncDecl/FuncType).
See also:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.RefactoringIssues related to refactoring toolsIssues related to refactoring toolsgopls/parsingIssues related to parsing / poor parser recovery.Issues related to parsing / poor parser recovery.
