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

[ch5 Bug] exec path of user proc #117

Closed Bariona closed 1 year ago

Bariona commented 1 year ago

In line 19 of /user/src/bin/forkexec.rs, I think it should be written as exec("hello_world\0"); (with an extra '\0' in terms of Rust language)

Though the repo runs fine, there is still a chance that the kernel will fetch the wrong string.

wyfcyx commented 1 year ago

Fixed, Thanks!