scroll-tech / scroll-tech/ceno
fix bss/sbss from static read-only to rw
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 153
- Forks
- 43
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 4
Description
The command
MOCK_PROVING=1 cargo run --features sanity-check --package ceno_zkvm --bin e2e -- --platform=ceno examples/target/riscv32im-ceno-zkvm-elf/debug/examples/ceno_rt_alloc
failed with read/write inconsistency.
The reason is for now when load elf, we treat bss/sbss read-only with other program data, e.g. text, rodata etc.
https://github.com/scroll-tech/ceno/blob/469890b7fb0181f6250174b1aded29b98491560f/ceno_emul/src/elf.rs#L206-L215
However bss/sbss are for static variables, e.g. for the guest program
https://github.com/scroll-tech/ceno/blob/469890b7fb0181f6250174b1aded29b98491560f/examples/examples/ceno_rt_alloc.rs#L8
Thus we need to make bss/sbss appeared in RAM region.
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
Start in ceno_emul/src/elf.rs around the ELF segment handling at lines 206-215, then inspect examples/examples/ceno_rt_alloc.rs to understand the static allocation that exposes the issue. Run the provided cargo e2e command with sanity-check enabled. Done means bss/sbss are represented in the RAM region and the read/write inconsistency no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 62/100