Skip to content

Commit 52e216e

Browse files
committed
Force LinkEntity to be zero-initialized to avoid use-of-uninitialized-value problems.
1 parent c71c1e1 commit 52e216e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/swift/IRGen/Linking.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ class LinkEntity {
680680
Data = LINKENTITY_SET_FIELD(Kind, unsigned(kind));
681681
}
682682

683-
LinkEntity() = default;
683+
LinkEntity() : Pointer(nullptr), SecondaryPointer(nullptr), Data(0) {}
684684

685685
static bool isValidResilientMethodRef(SILDeclRef declRef) {
686686
if (declRef.isForeign)

0 commit comments

Comments
 (0)