rcore-os / rCore-Tutorial-v3

Let's write an OS which can run on RISC-V in Rust from scratch!
https://rcore-os.github.io/rCore-Tutorial-Book-v3/index.html
GNU General Public License v3.0
1.58k stars 452 forks source link

Remove undefined behavior in usertests of ch8 #140

Closed wyfcyx closed 7 months ago

wyfcyx commented 7 months ago

We should use addr_of! or addr_of_mut! to create a raw pointer to a static mutable value.