Skip to content

Commit d6906d8

Browse files
committed
Revert Attempted Fix of SR6812
The original fix being reverted was #1557 made _cfinfoa 32-bit, which is generally correct, but it was really attempting to fix the same issue that #1525 had fixed. Historically, _cfinfoa has been 64-bit on Linux dating back to at least Swift 3. In the short term, because forward fixing the issues with #1557 uncover other lurking 32-bit alignment issues on Linux, it is safer to revert #1557. But because it did make for some cleaner ifdefs on the Darwin side as well, the Darwin pieces are being left alone. Going forward, it will take some investigation to uncover the reasons behind the other 32-bit alongment issues. Original context around this problem and previous attempted fixes/reverts:
1 parent 7df89db commit d6906d8

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

CoreFoundation/Base.subproj/CFRuntime.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -194,19 +194,11 @@ typedef struct __CFRuntimeBase {
194194
// This matches the isa and retain count storage in Swift
195195
uintptr_t _cfisa;
196196
uintptr_t _swift_rc;
197-
// This is for CF's use, and must match _NSCFType layout
198-
#if defined(__LP64__) || defined(__LLP64__)
197+
// This is for CF's use, and must match __NSCFType/_CFInfo layout
199198
_Atomic(uint64_t) _cfinfoa;
200-
#else
201-
_Atomic(uint32_t) _cfinfoa;
202-
#endif
203199
} CFRuntimeBase;
204200

205-
#if defined(__LP64__) || defined(__LLP64__)
206201
#define INIT_CFRUNTIME_BASE(...) {0, _CF_CONSTANT_OBJECT_STRONG_RC, 0x0000000000000080ULL}
207-
#else
208-
#define INIT_CFRUNTIME_BASE(...) {0, _CF_CONSTANT_OBJECT_STRONG_RC, 0x00000080UL}
209-
#endif
210202

211203
#else
212204

CoreFoundation/String.subproj/CFString.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,7 @@ struct __CFConstStr {
165165
struct {
166166
uintptr_t _cfisa;
167167
uintptr_t _swift_rc;
168-
#if defined(__LP64__) || defined(__LLP64__)
169168
uint64_t _cfinfoa;
170-
#else // 32-bit:
171-
uint32_t _cfinfoa;
172-
#endif // defined(__LP64__) || defined(__LLP64__)
173169
} _base;
174170
uint8_t *_ptr;
175171
#if defined(__LP64__) && defined(__BIG_ENDIAN__)

0 commit comments

Comments
 (0)