mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Explanation: Large trivial types were copied via memcpy instead of doing a field-wise copy. This is incorrect for types with reference fields where we also need to bump the corresponding refcounts. This PR makes sure that trival C++ types with reference members are not trivial in Swift. Issues: rdar://160315343 Original PRs: #84321 Risk: There is a low chance of breaking source compatibility as some types that used to be BitwiseCopyable are no longer considered as such. However, code relying on that probably has latent memory safety bugs. Testing: Added a compiler test. Reviewers: @egorzhdan, @j-hui
74 KiB
74 KiB