4 ms·
Not really. We can simply expand it to "All code has bugs", and then we're simply at Rice's theorem. In C, the class of bugs that can not be proven to not exist
by staticassertion 10y ago
Not really. We can simply expand it to "All code has bugs", and then we're simply at Rice's theorem. In C, the class of bugs that can not be proven to not exist are also quite dangerous - remote code execution, as an exemplar consequence. In rust, you're limited to a program that can crash, or that has other semantic faults.
So it's clearly not wrong, and is actually a totally well established idea well outside of the context of rust or C.
- Thrillington 10y agoAn 8-bit AVR executes instructions from on board flash memory that requires twiddling hardware lines to erase and rewrite. Remote code execution isn't a concern.
- pjmlp 10y agoNo, but memory corruption related to pointers misuse or unsigned arithmetic is.
- boznz 10y agoAVR ATMega is self programmable ie a bootloader can re-flash it if its configured to allow but you would need some code already resident on the flash to allow, it couldnt be done without this code.
- milesrout 10y agoYou can very easily have all the sorts of memory unsafety you have in C, in Rust.
- pjmlp 10y agoOnly in sections marked as unsafe. In C every single line of code that manipulates pointers, does string operations, uses arrays or unsigned arithmetic is a possible cause of memory corruption.