← Back to context

Comment by pizlonator

2 years ago

Fil-C - a memory safe implementation of C and C++.

Written in C and C++.

Need most help just porting C programs to Fil-C. Often porting is as easy as recompiling, but sometimes there are compatibility issues to resolve similar to if you were porting C code to a new CPU or OS. Could also use help with compiler hacking (llvm expertise required) and runtime hacking (experience with high level language runtimes required).

https://github.com/pizlonator/llvm-project-deluge

Are use-after-free and such bugs detected at compile time? There are still some cases that scan-build, cppcheck and other static analysis tools do not find.

  • They’re deterministically detected at runtime. Any use of a pointer to an object that got freed will trap with a filc safety error, which terminates program execution and prints a backtrace.

    I don’t think it’s possible to catch all use after frees at compile time precisely. Like, you could have a checker that catches all errors but also rejects valid programs or you can have a checker that accepts all valid programs but doesn’t find all the bugs. To be precise it has to be at runtime, and that’s what Fil-C does.

    • can you imagine a program termination in the middle of a surgical operation?

      It is harmless for less critical jobs though, like image viewing.

      1 reply →