Review Board 2.0.15


syscall_emu: Corrected a bug on the syscall "read()" when reading EOF

Review Request #3567 - Created July 12, 2016 and discarded - Latest diff uploaded

Information
Nicolas Derumigny
gem5
Reviewers
Default

syscall_emu: Corrected a bug on the syscall "read()".
Read() should not write anything when returning 0 (EOF). This patch does not correct the same bug occuring for :

nbr_read=read(file, buf, nbytes)

When nbr_read<nbytes, nbytes bytes are copied into the virtual RAM instead of nbr_read. If buf is smaller than nbytes, a page fault occurs, even if buf is in fact bigger than nbr_read.

Works with CERE codelets (https://github.com/benchmark-subsetting/cere), correcting the issue when replacing dumps in memory.