> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 11/05/2018 11:27, Peter Maydell wrote: > >> +uint8_t replay_get_byte(void) > >> +{ > >> + uint8_t byte = 0; > >> + if (replay_file) { > >> + byte = getc(replay_file); > >> + } > >> + return byte; > >> +} > > Coverity (CID 1390576) points out that this function isn't checking > > the error return from getc(). That means we could incorrectly return > > 255 from here and then the return value from replay_get_dword would > > be 0xffffffff, which is unfortunate if the place that's using > > that uses it as a loop boundary. > > Thanks! Pavel can you check it? How is error checking done in general > for record/replay, should QEMU exit immediately?
Yes, usually there is no sense continuing the replayed execution in case of an io error. Therefore closing QEMU is fine. Pavel Dovgalyuk