Commit Graph

2 Commits

Author SHA1 Message Date
Dario Rexin
4a8f9a5ca6 [Test] Add executable_test requirement to closure_zero_size_allocation.swift (#58674)
rdar://92744237
2022-05-04 20:21:59 -07:00
Dario Rexin
e6d75b126a [IRGen] Return null reference from IRGenFunction::emitUnmanagedAlloc … (#58532)
* [IRGen] Return null reference from IRGenFunction::emitUnmanagedAlloc when layout isKnownEmpty

rdar://92418090

This fixes a runtime crash on x86 caused by allocations of size 0, which are later deallocated with swift_deallocObjectImpl, but are missing the object header.

* Fix test compiler arguments

* Add IRGen test case

* Add assert to FixedBoxTypeInfoBase does not get created with known empty layout
2022-05-03 22:21:47 -07:00