Skip to content

Commit d70f35d

Browse files
authored
Merge pull request #34218 from CodaFi/pseudo-lithis
Patch Out Use-Of-Stack-After-Free In Cross Module Dependencies
2 parents 171e0e2 + 38b1da3 commit d70f35d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Driver/FineGrainedDependencyDriverGraph.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,11 @@ StringRef ModuleDepGraph::getProvidingFilename(
752752
const Optional<std::string> swiftDeps) const {
753753
if (!swiftDeps)
754754
return "<unknown";
755+
auto ext = llvm::sys::path::extension(*swiftDeps);
756+
if (file_types::lookupTypeForExtension(ext) ==
757+
file_types::TY_SwiftModuleFile) {
758+
return *swiftDeps;
759+
}
755760
const StringRef inputName =
756761
llvm::sys::path::filename(getJob(swiftDeps)->getFirstSwiftPrimaryInput());
757762
// FineGrainedDependencyGraphTests work with simulated jobs with empty

0 commit comments

Comments
 (0)