Skip to content

Remove dead code in 64-bit overflow protection - #5371

Open
AZero13 wants to merge 1 commit into
swiftlang:mainfrom
AZero13:overflow
Open

Remove dead code in 64-bit overflow protection#5371
AZero13 wants to merge 1 commit into
swiftlang:mainfrom
AZero13:overflow

Conversation

@AZero13

@AZero13 AZero13 commented Jan 11, 2026

Copy link
Copy Markdown
Contributor

Swap into place if overflow doesn't happen.

__CFBitfield64SetValue call operated on newInfo from a previous loop iteration (or uninitialized on first iteration), not the current info.

Plus, newInfo = info + RC_INCREMENT; was executed unconditionally after the overflow check, overwriting any value set by __CFBitfield64SetValue.

__CFBitfield64SetValue call operated on newInfo from a previous loop iteration (or uninitialized on first iteration), not the current info.

Plus, newInfo = info + RC_INCREMENT; was executed unconditionally after the overflow check, overwriting any value set by __CFBitfield64SetValue.
@AZero13 AZero13 changed the title Fix dead code in 64-bit overflow protection Remove dead code in 64-bit overflow protection Jan 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant