Skip to content

Instantly share code, notes, and snippets.

@colemancda
Created March 6, 2022 07:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colemancda/e2f00ab2e4226b0543fb2f332c47422e to your computer and use it in GitHub Desktop.
Save colemancda/e2f00ab2e4226b0543fb2f332c47422e to your computer and use it in GitHub Desktop.
Swift 5.5.3 patch for ARC on Arm
diff --git a/stdlib/public/SwiftShims/RefCount.h b/stdlib/public/SwiftShims/RefCount.h
index 5c8211f5e9f..fe54839aaae 100644
--- a/stdlib/public/SwiftShims/RefCount.h
+++ b/stdlib/public/SwiftShims/RefCount.h
@@ -1319,7 +1319,12 @@ class HeapObjectSideTableEntry {
public:
HeapObjectSideTableEntry(HeapObject *newObject)
- : object(newObject), refCounts()
+ : object(newObject),
+#if __arm__ // https://bugs.swift.org/browse/SR-5846
+ refCounts(SideTableRefCounts::Initialized)
+#else
+ refCounts()
+#endif
{ }
#pragma clang diagnostic push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment