Safe-C just crossed 200 ⭐️s on GitHub!
There is interest in this project because it disrupts the status quo: Rust is no longer the only path to memory safety for systems code, and decades of C and C++ codebases can be evolved rather than rewritten.
The project is early and prioritizes memory safety over ergonomics: a missed memory error is treated as a bug, while some correct code is still rejected (no false negatives, some false positives). User feedback is super helpful to ensure there is enough expressiveness in the rules, and to identify false positives.
Today's releases include fixes from user-reported issues (please file more!):
- Linux: glibc bugs fixed
- Compile time no longer grows with array size
- Correct code that was refused now compiles, with clearer errors
Also new:
- libc calls are now checked on Linux too (glibc, musl, picolibc), not just macOS
- Safe C++ ships with thread safety rules
https://t.co/5Z6v7SSffs
That is a good question. Roughly zero. C is underspecified, so it needs those annotations to be verifiably correct. I believe many of these annotations can be added programmatically by compiling to ClangIR, doing dataflow analysis and capturing facts (like this buffer is only indexed by this var), then going back to source and inserting the facts (like __counted_by(n))). Similar to JSIR (https://t.co/DKAcqSZFIm). I am going to try and build that tooling now.
@cs01_software Oh, you did a SAL/PreFAST
Have you considered implementing *literal* SAL2 instead of something custom? It's expressive and battle-tested.
https://t.co/4AzSh9069J
🚨 Calling C devs and security researchers 🚨
safecc is a Clang fork for C: if it compiles your program, it is guaranteed to be memory safe (similar to Rust).
I tried all day yesterday to get it to accept a program that has any kind of unsafe memory access and cannot do it: 8,330 cases, 10,000 programs, and core rules in Lean.
I need people to try to break safecc. If you can get an ASAN violation or non-panic crash under these conditions, please report an issue.
1. Use the `safecc` compiler
2. No __unsafe annotations in your code, no safecc cli flags to turn checks off
https://t.co/g8PVrEgpf7
🚨 Calling C devs and security researchers 🚨
safecc is a Clang fork for C: if it compiles your program, it is guaranteed to be memory safe (similar to Rust).
I tried all day yesterday to get it to accept a program that has any kind of unsafe memory access and cannot do it: 8,330 cases, 10,000 programs, and core rules in Lean.
I need people to try to break safecc. If you can get an ASAN violation or non-panic crash under these conditions, please report an issue.
1. Use the `safecc` compiler
2. No __unsafe annotations in your code, no safecc cli flags to turn checks off
https://t.co/g8PVrEgpf7
🚨 Calling C devs and security researchers 🚨
safecc is a Clang fork for C: if it compiles your program, it is guaranteed to be memory safe (similar to Rust).
I tried all day yesterday to get it to accept a program that has any kind of unsafe memory access and cannot do it: 8,330 cases, 10,000 programs, and core rules in Lean.
I need people to try to break safecc. If you can get an ASAN violation or non-panic crash under these conditions, please report an issue.
1. Use the `safecc` compiler
2. No __unsafe annotations in your code, no safecc cli flags to turn checks off
https://t.co/g8PVrEgpf7