riscv / riscv-test-env

https://jira.riscv.org/browse/RVG-141
Other
42 stars 107 forks source link

Reverse memcpy direction when evicts a page. #34

Closed eistar closed 2 years ago

eistar commented 2 years ago

A possible bug in "evict" function in v/vm.c: In line 123, when evict a dirty page in user space, memcpy should be from that page, rather than to the evicted page.

aswaterman commented 2 years ago

Yeah, looks right. I think the reason this never mattered in practice is that evict is only invoked at the end of a test program's execution, at which point the memory contents are no longer of interest.