This PR adds a CI job that builds and tests the library with Fil-C, a memory-safe implementation of C. Fil-C tracks for every pointer which object it belongs to, and stops the program on any access outside that object's bounds. This catches some bugs that AddressSanitizer and Valgrind can miss, e.g., an out-of-bounds access that lands inside another valid object.
Background: I recently came across a blog post by wolfSSL, who added Fil-C to their CI and found a heap buffer overflow with it, and watched a talk by Fil-C's author.
Details:
- Fil-C v0.687 is added to the x86_64 Debian CI image.
- Matrix: int64 and int128, both with the default table sizes.
- Valgrind, ctime tests and the symbol check are disabled, as they don't work with Fil-C.
- Test iterations are reduced to 2, as Fil-C binaries are slower and memory safety bugs are unlikely to depend on the iteration count.
I'm not sure yet this is worth a permanent job: the library has little variable-length parsing and is already covered by ASan, Valgrind and MSan, so I don't expect this to find much. On the other hand, the cost is low, it checks bounds exactly, which those tools don't, and it's easy to drop if it causes maintenance trouble. Opinions welcome.