From: "Pavel Dovgalyuk" <dovgaluk@ispras.ru>
To: 'Paolo Bonzini' <pbonzini@redhat.com>,
'Peter Maydell' <peter.maydell@linaro.org>
Cc: 'QEMU Developers' <qemu-devel@nongnu.org>,
'Pavel Dovgalyuk' <pavel.dovgaluk@ispras.ru>
Subject: Re: [Qemu-devel] [PULL 02/18] replay: internal functions for replay log
Date: Fri, 11 May 2018 12:56:34 +0300 [thread overview]
Message-ID: <002501d3e90e$587457f0$095d07d0$@ru> (raw)
In-Reply-To: <8a22efa3-94a0-5ffa-17df-45702601624d@redhat.com>
> From: Paolo Bonzini [mailto:pbonzini@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
next prev parent reply other threads:[~2018-05-11 9:56 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-05 12:13 [Qemu-devel] [PULL 00/18] Record/replay core for 2.5-rc1 Paolo Bonzini
2015-11-05 12:13 ` [Qemu-devel] [PULL 01/18] replay: global variables and function stubs Paolo Bonzini
2015-11-05 12:13 ` [Qemu-devel] [PULL 02/18] replay: internal functions for replay log Paolo Bonzini
2018-05-11 9:27 ` Peter Maydell
2018-05-11 9:51 ` Paolo Bonzini
2018-05-11 9:56 ` Pavel Dovgalyuk [this message]
2018-05-14 6:34 ` Markus Armbruster
2015-11-05 12:13 ` [Qemu-devel] [PULL 03/18] replay: introduce mutex to protect the " Paolo Bonzini
2015-11-05 12:13 ` [Qemu-devel] [PULL 04/18] replay: introduce icount event Paolo Bonzini
2015-11-05 12:13 ` [Qemu-devel] [PULL 05/18] cpu-exec: allow temporary disabling icount Paolo Bonzini
2015-11-05 12:13 ` [Qemu-devel] [PULL 06/18] cpu: replay instructions sequence Paolo Bonzini
2015-11-05 12:13 ` [Qemu-devel] [PULL 07/18] replay: interrupts and exceptions Paolo Bonzini
2015-11-05 12:13 ` [Qemu-devel] [PULL 08/18] replay: asynchronous events infrastructure Paolo Bonzini
2015-11-05 12:13 ` [Qemu-devel] [PULL 09/18] replay: recording and replaying clock ticks Paolo Bonzini
2015-11-05 12:13 ` [Qemu-devel] [PULL 10/18] replay: shutdown event Paolo Bonzini
2015-11-05 12:13 ` [Qemu-devel] [PULL 11/18] icount: improve counting for record/replay Paolo Bonzini
2015-11-05 12:13 ` [Qemu-devel] [PULL 12/18] replay: checkpoints Paolo Bonzini
2015-11-05 12:13 ` [Qemu-devel] [PULL 13/18] bottom halves: introduce bh call function Paolo Bonzini
2015-11-05 12:13 ` [Qemu-devel] [PULL 14/18] replay: ptimer Paolo Bonzini
2015-11-05 12:14 ` [Qemu-devel] [PULL 15/18] replay: initialization and deinitialization Paolo Bonzini
2015-11-05 12:14 ` [Qemu-devel] [PULL 16/18] replay: replay blockers for devices Paolo Bonzini
2015-11-05 12:14 ` [Qemu-devel] [PULL 17/18] replay: command line options Paolo Bonzini
2015-11-05 12:14 ` [Qemu-devel] [PULL 18/18] replay: recording of the user input Paolo Bonzini
2015-11-05 14:00 ` [Qemu-devel] [PULL 00/18] Record/replay core for 2.5-rc1 Peter Maydell
2015-11-05 14:07 ` Paolo Bonzini
2015-11-06 5:10 ` Pavel Dovgaluk
-- strict thread matches above, loose matches on Subject: below --
2015-11-04 16:17 [Qemu-devel] [PULL 00/18] Record/replay core for QEMU 2.4-rc1 Paolo Bonzini
2015-11-04 16:17 ` [Qemu-devel] [PULL 02/18] replay: internal functions for replay log Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='002501d3e90e$587457f0$095d07d0$@ru' \
--to=dovgaluk@ispras.ru \
--cc=pavel.dovgaluk@ispras.ru \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).