You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix MemoryLifetimeVerifier to ignore thin functions.
SILGen optimizes creation of closure down a thin function when it has
no captures:
%1 = thin_to_thick_function %0
: $@convention(thin) () -> () to $@callee_guaranteed () -> ()
ValueOwnership.cpp has a sketchy optimization that treat the result
like a trivial type, even though it is not:
> CONSTANT_OWNERSHIP_INST(None, ThinToThickFunction)
commit 8c5737d
Date: Fri Oct 23 15:12:18 2020 -0700
[ownership] Change thin_to_thick function to always produce a none value.
This creates a mismatch between the SILType and the SILValue
ownership. This is not a coherent design--we have a similar problem
with enums which is endlessly buggy--but reverting the decision will
be hard. Instead, I'll hack the memory verifier to silence this case.
Fixes rdar://115735132 (Lifetime verifier error with opaque return
type and closure)
0 commit comments