mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Previously, the extra data pattern structs for struct and enums were not packed. On 32 bit, this resulted in an extra data pattern struct which was 4 bytes too large whenever there was an odd number of fields in the struct. The result was writing past the end of the allocated struct. That bug only caused occasional crashes because (1) for the most part there was additional space beyond the end of the allocation intended for the struct metadata in the bump allocator and (2) while half of the trailing flags field would be overwritten, because those bits of the trailing flags being nonzero did not have an observable effect since those bits of the trailing flags field are not yet used. Here, the structs are marked packed, resulting in the appropriate size for the extra data pattern structs on 32 bit platforms. rdar://problem/68997282
34 KiB
34 KiB