mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SIL: fix serialization of the unchecked_ref_cast instruction
We didn't serialize the ownership kind, which resulted in a miscompile causing an over-release. The unchecked_ref_cast is the only instruction for which we change the ownership in the optimizer, so that it doesn't match the operand's ownership. Therefore this fix is sufficient for now - we don't need to serialize the ownership of other instructions. But this is really a design flaw of the `OwnershipForwardingMixin`. It should not allow to set the ownership to arbitrary values. rdar://92696202
This commit is contained in:
@@ -56,7 +56,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
|
||||
/// describe what change you made. The content of this comment isn't important;
|
||||
/// it just ensures a conflict if two people change the module format.
|
||||
/// Don't worry about adhering to the 80-column limit for this line.
|
||||
const uint16_t SWIFTMODULE_VERSION_MINOR = 688; // SILBoxType extensions
|
||||
const uint16_t SWIFTMODULE_VERSION_MINOR = 689; // cast ownership serialization
|
||||
|
||||
/// A standard hash seed used for all string hashes in a serialized module.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user