duneroadrunner/SaferCPlusPlus-AutoTranslation2
View on GitHub ↗ ★ 10
auto-conversion of C source files to a memory-safe subset of C++
8 mentions on Hacker News by 1 person: 0 stories, 8 comments · first 2021-02-18 · latest 2026-07-26
20082026
-
Well, there is another safe option for flexible pointers if you can compile as C++ [1]. In C++ you can have non-owning "smart" pointers with run-time-checked lifetimes [2][3]. Importantly, there is no run-time overhead to dereference them.…
comment by safercplusplus · 2026-07-26 · in Memory safety absolutists -
If the source language is C++, another option might be to use AI agents to port to a memory-safe subset of C++ [1]. For the most part, this involves surgical changes and glorified find-and-replace operations. And I'm guessing way fewer…
comment by safercplusplus · 2026-06-02 · in Expanding Project Glasswing -
You might be interested in the scpptool feature to help convert C code to a subset of C that will also compile as C++ (under clang++ at least) [1]. While many of the necessary modifications are fairly trivial, some of them aren't…
comment by safercplusplus · 2026-05-25 · in C constructs that still don't work in C++ -
> It's in many cases as simple as renaming a file from .c to .cpp. That is rather optimistic, but, for example, scpptool has a feature [1] that auto-converts from C to a subset of C that can (hopefully) be compiled with clang++. If the…
comment by safercplusplus · 2026-05-02 · in Lib0xc: A set of C standard library-adjacent APIs for safer systems programming -
As long as we're plugging our projects, I'll mention the scpptool-enforced memory-safe subset of C++. Fil-C would be generally more practical, more compatible and more expedient, but the scpptool-enforced subset of C++ is more directly…
comment by safercplusplus · 2025-10-02 · in DARPA project for automated translation from C to Rust (2024) -
In theory it could be auto-converted to a safe subset of C++ [1]. In theory it could be done at build-time, like the sanitizers. [1] https://github.com/duneroadrunner/SaferCPlusPlus-AutoTransla...
comment by safercplusplus · 2024-10-25 · in Why Safety Profiles Failed -
Hi pizlonator, I'm working on a solution with similar goals (I think), but a bit of a different approach. It's a tool that auto-translates[1] (reasonable) C code to a memory-safe subset of C++. The goal is to get it reliable enough that it…
comment by safercplusplus · 2024-02-28 · in United States White House Report on Memory Safe Programming [pdf] -
Some solutions aren't that well publicized. Here is an example of an open source png encoder/decoder written in C (mostly) being auto-translated to a memory-safe subset of C++: https://github.com/duneroadrunner/SaferCPlusPlus-AutoTransla...
comment by safercplusplus · 2021-02-18 · in Mitigating Memory Safety Issues in Open Source Software