r/ProgrammerHumor • • 9d ago • Mindblown 1

Meme rewriteInRust

Post image
23k Upvotes

468 comments sorted by

View all comments

Show parent comment

7

u/QuietSilentArachnid 8d ago

I feel like bool is closer to her vision, since you can do shenanigans with const and arrays

6

u/Pandafishe 8d ago

bools can be const too.. It's just an extra protection layer from changing the variable. But if you argue with shenanigans, no value is ever really secure as you can always do memory attacks

3

u/setibeings 8d ago

Those are harder on rust programs though. You're less likely to be able to make them overflow and start reading memories that don't belong to them.

7

u/Pandafishe 8d ago

you can always manipulate memory from outside a program anyway, unless you have a physical architecture that prevents it. It doesn't matter what language the attacked program is written in.

3

u/setibeings 8d ago

sure, but now you have to write an attack on the supervisor, to trick it into letting you write to memories you don't own. Or do i have this all wrong?