3 ms·
If 1) Rust contains no memory bugs 2) C can be automatically translated to it Then all memory bugs can be fixed automatically, which is almost certainly untr
by plasticeagle 2y ago
If
1) Rust contains no memory bugs
2) C can be automatically translated to it
Then all memory bugs can be fixed automatically, which is almost certainly untrue. This task is very likely completely impossible in the general case.
- warkdarrior 2y agoSince you did not specify that you wish to preserve all behaviors of the C code, there are trivial solutions to this problem. For example, one could replace all dynamic memory allocations with fixed buffers (set at translation time), and reject all inputs that do not fit in those buffers.