rcore-os / rcore-os/rCore-Tutorial-v3
chp3之前用户态 println! 有问题
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 560
- PR merge metrics
- No merged PRs in 30d
Description
(我目前在写 chp3。
背景:“锯齿螈”内核(就是先一次性加载所有程序,然后顺序运行),ch3分支。
问题概述:假设每个程序是2MB,一共两个程序。那么它们在链接时会在0x8020_0000上面一点,但是运行前会分别被拷贝到[0x8040_0000,0x8060_0000)和[0x8060_0000,0x8080_0000)。然后修改第二个用户程序,只需要改成println!("{}",1),然后在fs.rs里打印缓冲区起始地址,会发现它并不在[0x8060_0000,0x8080_0000)之间,而是0x8020_0000上一点(即链接的位置)。



Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report on the ch3 branch by changing the second user program to println!("{}", 1) and printing the buffer start address in fs.rs. Trace how the programs are linked, copied into their runtime ranges, and then executed. Done means the second program's buffer address is within [0x8060_0000,0x8080_0000) and its println! output remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100