News for hackers. Stuff that matters.

betz47

Re:C but Safe on Friday April 05, 2024 @05:33AM (#39940454)
This is our thinking as well, a complete rewrite in another language (short of formally verifying the code) could introduce all sorts of logical bugs that did not exist or were patched in the old code.
Re:C but Safe on Friday April 05, 2024 @05:24AM (#39940409)
We chose to start with temporal safety (use-after-free, uninitialised memroy etc) but are going to implement spacial safety (buffer overflows/underflows) soon (See roadmap https://xr0.dev/vision-roadmap).

Xr0 is not limited to memory-safety, its goal is to eliminate the possibility of writing C code that results in undefined behaviour. A good analogy can be drawn to how Typescript wraps Javascript and provides type safety. Think of Xr0 as a wrapper to C that guarantees you don't violate C's safety semantics.

Re:C but Safe on Friday April 05, 2024 @04:17AM (#39939915)
Xr0 is currently targeting the c89 spec and working up from there, thread safety is something that we would address in C11 (See a previous discussion here https://news.ycombinator.com/item?id=39858240#39858813).
Re:C but Safe on Friday April 05, 2024 @04:04AM (#39939839)
Xr0 currently works this way, the annotations can be stripped out with a "-s" flag (See here https://xr0.dev/learn#compiling)