Skip to content

Restrict RemoteASTTypeBuilder::findModule() to the list of loaded modules #17345

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

Merged
merged 1 commit into from
Jun 20, 2018

Conversation

adrian-prantl
Copy link
Contributor

LLDB uses RemoteAST for its per-module SwiftASTContext. Importing
external modules here could permanently damage this context, for
example when a Clang import fails because of missing header search
options. To avoid this situation, restrict RemoteAST's access to only
the module's transitive closure of imports.

Triggering this situation needs two independent Swift compilation
units. An accompanying testcase (Swift/RemoteASTImport.test) has been
added to LLDB.

rdar://problem/40950542

…ules.

LLDB uses RemoteAST for its per-module SwiftASTContext. Importing
external modules here could permanently damage this context, for
example when a Clang import fails because of missing header search
options. To avoid this situation, restrict RemoteAST's access to only
the module's transitive closure of imports.

Triggering this situation needs two independent Swift compilation
units. An accompanying testcase (Swift/RemoteASTImport.test) has been
added to LLDB.

rdar://problem/40950542
@adrian-prantl
Copy link
Contributor Author

test with apple/swift-lldb#704
@swift-ci test

@adrian-prantl
Copy link
Contributor Author

test with apple/swift-lldb#704
@swift-ci test

@jrose-apple
Copy link
Contributor

This looks correct to me; I'd just like someone within Apple to confirm that this won't mess up anyone else's use of RemoteAST.

@adrian-prantl
Copy link
Contributor Author

If you have anyone specific in mind, please feel free to add more reviewers!

@adrian-prantl adrian-prantl merged commit 59e3450 into swiftlang:master Jun 20, 2018
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

Successfully merging this pull request may close these issues.

2 participants