News for hackers. Stuff that matters.
Re:Git's list of banned C functions by scoutt on Friday March 05, 2021 @08:35AM (#26356687)
Any runtime security measure produces overhead (array bounds checking, dynamically checked borrow rules like Rust RefCell, etc.), at least in computational cycles. There is no magic formula.

Calculating mandelbrot fractals to measure speed might be a nice exercise in which Rust or Zig can compete with C. But in a real software implementation, when you need to open a file you still have to call the OS function fopen(). Whatever thing File::open (Rust) is doing before calling fopen() is overhead.

How can you avoid that overhead? Write in C (at your own risk).

Re:Git's list of banned C functions by kaba0 on Friday March 05, 2021 @11:10AM (#26358403)
Compile time security measures have absolutely no runtime overhead. Also, I don’t see what you mean by File::open — there is a kernel call somewhere there. But if you are writing a new OS you are free to implement the fopen call as you wish - C has no advantage here.
Re:Git's list of banned C functions by IgorPartola on Friday March 05, 2021 @05:13PM (#26362841)
Not all bounds checking can be done at compile time, can it? You can’t check if a file exists on a target system before it is opened at compile time, can you?