News for hackers. Stuff that matters.
Re:Let rand = main as usize by ryukoposting on Thursday June 06, 2024 @11:51PM (#40605158)
A key thing to consider is that there's nothing innately unsafe about casting a pointer to a number. It's when you go the other way around that problems crop up.

As long as dereferencing a raw pointer is considered unsafe, you're fine. Casting it has no actual effect at the machine level.

There are no comments on this comment yet.