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
Protect Box.unbox from dereferencing null pointer (#16514)
Unboxing a null pointer leads to invalid memory access when the target type is not nilable.
We can avoid this by raising an explicit exception. This makes `Box.unbox` a little bit safer.
Of course, we can still not protect against any other invalid pointer. But null pointers are easily identifiable as invalid. This is low-hanging fruit for a bit more implicit memory safety.
0 commit comments