3 ms·
Just this week we were porting some old c++ over to rust, stuff from the 90s probably. It was relying on the last element of an array being zero due to null ter
by galangalalgol 4y ago
Just this week we were porting some old c++ over to rust, stuff from the 90s probably. It was relying on the last element of an array being zero due to null termination. It used that value in its computation. That sounds crazy but fine, except it wasn't an array of bytes, so if it wasn't aligned and padded to 4bytes that last value might not be all zeroes. I don't know a common arch outside of microcontrollers where it wouldn't work, but still!
- scruple 4y agoWhat uC? I'm interested in learning which vendors are shipping rust toolchains for their chips.
- galangalalgol 4y agonot using it on a uC, it did work in c++. Bounds checker caught it in rust. I was just postulating it might not work in c++ everywhere.
- scruple 4y agoAhh, gotcha.