Towards memory safety with ownership checks for C

The content discusses the concept of Cake – C23 and Beyond, focusing on abstract owner objects, view objects, and static analysis for checking code and preventing bugs, including memory bugs. New qualifiers and methods of communication with the compiler have been created to ensure safety by default. Owner objects are objects managing the lifetime of another object, often pointers, while view objects are those referencing another object without managing its lifetime. The article also covers returning view pointers, deleting owner pointers, and implementing destructors. Static analysis involves checking ownership rules at compile time, utilizing states like uninitialized, moved, null, not-null, zero, and not-zero. Cake aims to ensure safety in C programming through static analysis and new qualifiers. (Word count: 450)

http://thradams.com/cake/ownership.html

To top