News for hackers. Stuff that matters.
Re:Let rand = main as usize by EE84M3i on Thursday June 06, 2024 @04:55PM (#40602296)
The current behavior is clearly documented in the Rust Reference[1]:

>The following language level features cannot be used in the safe subset of Rust: > Dereferencing a raw pointer. > Reading or writing a mutable or external static variable. > Accessing a field of a union, other than to assign to it. > Calling an unsafe function (including an intrinsic or foreign function). > Implementing an unsafe trait.

It also calls out the behavior in noted in this specific post in "Behavior not considered unsafe"[2]:

> Exposing randomized base addresses through pointer leaks

[1]: https://doc.rust-lang.org/reference/unsafety.html

[2]: https://doc.rust-lang.org/reference/behavior-not-considered-...

There are no comments on this comment yet.