News for hackers. Stuff that matters.
Re:A brief introduction to C++'s model for type- and resourc... by nickpsecurity on Friday January 15, 2016 @11:48PM (#10914297)
I should've clarified that my statement assumes his model works as advertised, then notes that the pointer checks are efficient in hardware. I couldn't be sure if he was detecting or preventing use-after-free with what would be in compiler and what in runtime. Here's the things I was looking at:

"supports the general thesis that garbage collection is neither necessary nor sufficient for quality software. This paper describes the techniques used to eliminate dangling pointers and to ensure resource safety."

"Every object on the free store (heap, dynamic store) must have exactly one owner [pointer/reference]"

"set the ownership bit when a value returned from new is assigned"

"use delete whenever a pointer with the ownership bit is set goes out of scope"

Sounds similar to what I read in Rust guide, esp one-per-location and scope part. Those and other rules appeared to make it easy for checks to prevent or catch use-after-free. If so, then my keep it around for hardware suggestion could lead to acceleration work. If I misread the paper or goals of ownership model, then my suggestion would've only led to accelerating... whatever safety it was trying to enforce.

Did that clear it up for you? Or did you spot where I went wrong? Could go either way given it was a quick read for me.

There are no comments on this comment yet.