What does HackerNews think of checkedc?
Checked C is an extension to C that lets programmers write C code that is guaranteed by the compiler to be type-safe. The goal is to let people easily make their existing C code type-safe and eliminate entire classes of errors. Checked C does not address use-after-free errors. This repo has a wiki for Checked C, sample code, the specification, and test code.
### 2022/12
- {musical note emoji} [Mendelssohn - Complete Piano Works](https://www.amazon.pl/Complete-Piano-Works-Prosseda/dp/B084D...)
- [Checked C](https://github.com/microsoft/checkedc) - extensions to make C safer #cpp
- [SQLite Internals: How The World's Most Used Database Works](https://www.compileralchemy.com/books/sqlite-internals/)
- {book emoji} [Ask HN: Best books read in 2022?](https://news.ycombinator.com/item?id=33849267) - some interesting pieces here
### 2022/11
- [The Linux Kernel Module Programming Guide](https://sysprog21.github.io/lkmpg/), [repo](https://github.com/sysprog21/lkmpg) #linux
...
And so on. I know it's simplistic, but it helped me a lot to keep the number of links under a reasonable limit, and it is effortless to search through.
Checked C is essentially a gradually typed spatially safe C—checked pointers are backwards-binary compatible with legacy pointers, and the language allows them to be added piecemeal, rather than necessarily all at once, so that safety retrofitting can be incremental.
This paper presents a semi-automated process for porting a legacy C program to Checked C. The process centers on 3C, a static analysis-based annotation tool. 3C employs two novel static analysis algorithms—typ3c and boun3c—to annotate legacy pointers as checked pointers, and to infer array bounds annotations for pointers that need them...
Experiments on 11 programs totaling 319KLoC show 3C to be effective at inferring checked pointer types, and experience with previously and newly ported code finds 3C works well when combined with human-driven refactoring...."
PDF: https://arxiv.org/ftp/arxiv/papers/2203/2203.13445.pdf
Checked C Project:
https://www.microsoft.com/en-us/research/project/checked-c/
https://github.com/microsoft/checkedc
"Checked C: Making C Safe by Extension":
https://www.microsoft.com/en-us/research/uploads/prod/2018/0...
I salute the idea of fixing C shortcomings instead of starting over from scratch (Rust, Zig), but clearly this mix of large functional annotations on top of procedural code adds some burden and inelegance.
The automated formal code proving will appeal security researchers, but I doubt most developers will want to go through that.
As a developer, I would rather use checked-C since it's only a thin overlay requiring little syntactic sugar on top of C99. https://github.com/microsoft/checkedc
However, unlike RefinedC, it requires a new compiler and headers...
1. https://www.microsoft.com/en-us/research/project/checked-c/