logoalt Hacker News

Animatsyesterday at 8:16 AM1 replyview on HN

The article doesn't address the hard problem of figuring out array sizes. There's some work going on as part of the DARPA TRACTOR program to work on that. This area, of course, is the usual cause of buffer overflows.

The goal is to convert C pointers to Rust arrays, pointer arithmetic to Rust slices, and array allocations to Vec initialization. The hard problem is figuring out the sizes of arrays, which is going to require global analysis down the call chain.

If you're going to publish papers on this, please address that problem.


Replies

ueckeryesterday at 10:18 AM

Of course, one you have identifies the bounds to each pointer you could just do bounds checking in C.

show 1 reply