Commit 928900c
committed
Fix Unmanaged.passRetained
Unmanaged.passRetained was originally implemented as:
- store the passed referenced into an unowned(unsafe) reference
- (the reference will now be released if the store is the last use)
- reload the unowned(unsafe) reference
- retain the reloaded reference
It should be implemented as:
- retain the passed reference
- store the passed reference to an unowned(unsafe) reference
Fixes rdar://105609600
(🔥 non-deterministic miscompile in stdlib's
_StringGuts.populateBreadcrumbs)1 parent bfd140f commit 928900c
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| |||
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
222 | 229 | | |
223 | 230 | | |
224 | 231 | | |
| |||
0 commit comments