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
{{ message }}
Repository navigation
Calling an empty closure crashes with no message (a null fn, or a fn? holding null) #3091
Program crashed (0xC0000005: access violation) (v0.838.0): null is the empty closure (#3062, and since #3077 in every closure slot, an optional's included), and a call through it jumps to address 0. A fn? given null is present (some empty closure), so o ?? || { ... } keeps it and the call crashes the same way.
Expected: a call through an empty closure is a named panic at the call site ("called an empty closure"), as other runtime errors are, so the program says what went wrong and where. The fn?/null reading belongs in the language reference beside it: null in a fn? is a present empty closure, none is the absence.
Activity
A call through a null typed function pointer is a named panic (#3098)
A call through the empty closure is a named panic at the call (aether…