Skip to content

Commit 2e2e577

Browse files
authored
Merge pull request #26807 from slavapestov/type-alias-asan-fix
AST: Fix memory corruption in TypeAliasType::get()
2 parents 2187fb2 + 3a537cb commit 2e2e577

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/AST/ASTContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2249,7 +2249,7 @@ TypeAliasType *TypeAliasType::get(TypeAliasDecl *typealias, Type parent,
22492249
return result;
22502250

22512251
// Build a new type.
2252-
auto *genericSig = typealias->getGenericSignature();
2252+
auto *genericSig = substitutions.getGenericSignature();
22532253
auto size = totalSizeToAlloc<Type, SubstitutionMap>(parent ? 1 : 0,
22542254
genericSig ? 1 : 0);
22552255
auto mem = ctx.Allocate(size, alignof(TypeAliasType), arena);

0 commit comments

Comments
 (0)