logoalt Hacker News

raggiyesterday at 8:52 PM2 repliesview on HN

It doesn’t but the problem space is more constrained as you are at least in control of heap vs stack storage. Register clearing is not natively available though. To put it more simply: yes but you can write this in rust- you can’t write it in go today.


Replies

purplesyringayesterday at 10:25 PM

You can try to write it in Rust, doesn't mean you'll succeed. Rust targets the abstract machine, i.e. the wonderful land of optimizing compilers, which can copy your data anywhere they want and optimize out any attempts to scramble the bytes. What we'd need for this in Rust would be an integration with LLVM, and likely a number of modifications to LLVM passes, so that temporarily moved data can be tracked and erased. The only reason Go can even begin to do this is they have their own compiler suite.

show 2 replies
leohtoday at 2:37 AM

This is basically my point, in addition to the fact that the time at which data is freed from the heap is far more predictable.