mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SourceKit] Run SwiftParser on a deep stack for the related identifiers request
We ran SwiftParser in `handlePrimaryAST` for related identifiers. That function is called on a dispatch queue with reduced stack size and could cause the parser to stack overflow if the program is very nested. Run `handlePrimaryAST` on a deep stack for this request to fix the issue. rdar://129960285
This commit is contained in:
@@ -2537,6 +2537,8 @@ void SwiftLangSupport::findRelatedIdentifiersInFile(
|
||||
std::function<void(const RequestResult<RelatedIdentsResult> &)> Receiver;
|
||||
SwiftInvocationRef Invok;
|
||||
|
||||
bool requiresDeepStack() override { return true; }
|
||||
|
||||
#if SWIFT_BUILD_SWIFT_SYNTAX
|
||||
// FIXME: Don't silently eat errors here.
|
||||
RelatedIdentsResult getRelatedIdents(SourceFile *SrcFile,
|
||||
|
||||
Reference in New Issue
Block a user