Fil-C 0.682 — memory safety without rewriting


2

Fil-C 0.682 has been released—a C and C++ compiler that provides complete memory safety and offers greater guarantees than many other languages, such as Rust. The project is being developed by Filip Pizlo, who needs no introduction.

Fil-C is based on the Clang/LLVM 20.x codebase and allows you to compile traditional C/C++ code with guaranteed prevention of all major vulnerabilities (out-of-bounds access, use-after-free, double-free, type confusion). Unlike ASan or MTE, Fil-C uses a strictly safe object model and is fundamentally free of loopholes such as unsafe blocks.

Over the past year, the project has evolved from a proof-of-concept to a fully-fledged toolkit with a large-scale ecosystem.

Key features and technical details:

  • InvisiCaps 2.0 and the evolution of the Capability model: The capabilities system has been significantly redesigned to track the boundaries and types of pointers without changing their 64-bit size in the C address space. Capability storage has been optimized, overhead has been reduced, and correct support for union, memcpy, atomic operations with structures, and capability transfer via inline assembler has been added.
  • Parallel Garbage Collector (FUGC): In the runtime garbage collector Fil's Unbelievable Garbage Collector Added parallel compilation, support for complex objects such as closures and GNU Indirect Function.
  • ARM64 support: The backend, runtime, bootloader and ABI for the ARM64 architecture have been implemented almost from scratch (Linux/aarch64), the project has entered the beta testing phase on this platform.
  • Safe inline assembler and SIMD: Added a unique ability to perform safe assembly inserts (including OpenSSL assembly blocks) while preserving permission checking. Full support for SSE, AVX, AVX2, and AVX512 vector instructions (including masked load/store, expand/compress, sfence, and prefetch) is implemented.
  • Escape Analysis: Starting with version 0.671, static analysis of stack memory leaks was implemented. This was the largest optimization change in a year: QuickJS execution speed increased more than sixfold, and most other programs by more than 10%.
  • Compatibility with C++ and modern standards: Support has been implemented for C++ exceptions, forced stack unwinding, ucontext, computed jumps, std::optional, and pointers to class members.
  • Protection against dangerous LLVM UB optimizations: Fil-C effectively disables aggressive LLVM optimizations that rely on Undefined Behavior (UB). Specifically, strict aliasing is forcibly disabled and its equivalent, -fwrapv, is enabled, preventing the compiler from incorrectly removing safety checks.
  • Migrating to LLVM/Clang 20: The compiler has been migrated to the Clang 20 code base (since Fil-C 0.670), which ensures better compatibility and portability of code generation.
  • Expansion Linux Next generation ABI and FFI: Implemented emulation and secure wrappers for dozens of system calls Linux (statx, openat2, pidfd, epoll, splice, futex, timer API, etc.), as well as support for dlopen, dlvsym, libffi, and an FFI layer for interacting with external code.
  • New calling convention and runtime API: The internal function call ABI has been optimized to reduce overhead. New APIs have been added, including zlock_runtime_threads() (thread locking for strict sandboxing), as well as a built-in sampling profiler and memory dump tools.
  • A full-fledged userspace distribution /opt/fil: A secure system environment based on glibc 2.40, including OpenSSH, OpenSSL, sudo, git, curl, wget, rsync, tmux, make, grep, and system libraries (PAM, Kerberos, SE)Linux, ICU).

Ready-made binary assemblies are distributed in two versions: standalone based on musl (filc) and a full system environment /opt/fil for x86_64 and ARM64 architectures.

Project GitHub

We also note that there is also a memory-safe distribution. Linux Pizlix

Source: linux.org.ru

Buy reliable hosting for sites with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster