Skip to content

Commit edc6bca

Browse files
Merge pull request #71902 from cachemeifyoucan/eng/PR-asan-package-name-error
Fix a use-after-free in `getPackageInterfacePathIfInSamePackage`
2 parents f738cbc + aa5ef57 commit edc6bca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Serialization/SerializedModuleLoader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ SerializedModuleBaseName::getPackageInterfacePathIfInSamePackage(
611611

612612
if (fs.exists(packagePath)) {
613613
// Read the interface file and extract its package-name argument value
614-
StringRef result;
614+
std::string result;
615615
if (auto packageFile = llvm::MemoryBuffer::getFile(packagePath)) {
616616
llvm::BumpPtrAllocator alloc;
617617
llvm::StringSaver argSaver(alloc);

0 commit comments

Comments
 (0)