mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
An @objc convenience initializer can replace 'self'. Since IRGen has no way to tell what the new 'self' value is from looking at SIL, it always refers back to the original 'self' argument when recovering DynamicSelfType metadata. This could cause a crash if the metadata was used after the 'self' value had been replaced. To fix the crash, always insert the metadata recovery into the entry block, where the 'self' value should be valid (even if uninitialized, the 'isa' pointer should be correct). Fixes <rdar://problem/50594689>.
666 B
666 B