Memory Safe Inline Assembly
- Programming
- Security
- Compiler
- Developer Tools
The post introduces Fil-C support for a narrow class of inline assembly in C and C++. Fil-C is a runtime and compiler project that aims to make existing C code fail safely on memory bugs instead of turning undefined behavior into exploitation. The new feature works by parsing GCC-style inline asm, allowing only a restricted instruction set, and checking that every effect is fully declared through inputs, outputs, and clobbers. If Fil-C cannot prove the asm stays within those rules, it replaces that code path with a runtime panic rather than trying to run something it cannot model safely.
If you are evaluating memory-safe C retrofits, focus less on the novelty of parsing asm and more on the operational model: unsupported asm turns into traps, not silent corruption. If your codebase depends on tricky inline asm for SIMD, atomics, or restartable sequences, expect to keep fallback paths or do real validation work before betting on portability.
- fil-c.org
- Discuss on HN