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
The intent is that this function is sound because even if allocation is unsafe and fails, we simply OOM so we panic and stop execution. We intend that in a safe context only a safe default constructor will be called but new being unsafe necessitates a block where it's easy to silently mask that we now also permit unsafe default constructors, which permits a soundness hole.
May ultimately want safe new and safe delete operator names.
For safe delete, the operator should be safe and take a special type for the pointer that has an unsafe constructor. That moves the unsafe proof to the user.
Assume a simple function like:
It's easy to introduce a soundness hole here.
The intent is that this function is sound because even if allocation is unsafe and fails, we simply OOM so we panic and stop execution. We intend that in a safe context only a safe default constructor will be called but
new
being unsafe necessitates a block where it's easy to silently mask that we now also permit unsafe default constructors, which permits a soundness hole.Also see: https://godbolt.org/z/xM556saPr
The text was updated successfully, but these errors were encountered: