Re:Undefined Behavior in C and C++
by lifthrasiir on Friday February 23, 2024 @10:16PM
(#39488835)
Making double-free an UB makes `free` more efficient because there are less checks to make. Combined with use-after-free as an UB, that deallocated memory can be immediately reused for the next allocation without any repercussion. And making dangling pointer an UB makes most pointer analysis much more doable.
[ Parent
| on HN ]
There are no comments on this comment yet.