qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Stefan Weil <sw@weilnetz.de>
Cc: Richard Henderson <rth@twiddle.net>,
	QEMU Developers <qemu-devel@nongnu.org>,
	QEMU Trivial <qemu-trivial@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] tci: Remove invalid assertions
Date: Fri, 3 Feb 2017 12:32:33 +0000	[thread overview]
Message-ID: <CAFEAcA81egoo-mgkXxjFOWgP3=aJf=RuXHdApTn+Zt98aXkA4w@mail.gmail.com> (raw)
In-Reply-To: <20170202195601.11286-1-sw@weilnetz.de>

On 2 February 2017 at 19:56, Stefan Weil <sw@weilnetz.de> wrote:
> tb_jmp_insn_offset and tb_jmp_reset_offset are pointers
> and cannot be used with ARRAY_SIZE.
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  tcg/tci/tcg-target.inc.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/tcg/tci/tcg-target.inc.c b/tcg/tci/tcg-target.inc.c
> index 26ee9b1664..b6a15569f8 100644
> --- a/tcg/tci/tcg-target.inc.c
> +++ b/tcg/tci/tcg-target.inc.c
> @@ -566,7 +566,6 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args,
>      case INDEX_op_goto_tb:
>          if (s->tb_jmp_insn_offset) {
>              /* Direct jump method. */
> -            tcg_debug_assert(args[0] < ARRAY_SIZE(s->tb_jmp_insn_offset));
>              /* Align for atomic patching and thread safety */
>              s->code_ptr = QEMU_ALIGN_PTR_UP(s->code_ptr, 4);
>              s->tb_jmp_insn_offset[args[0]] = tcg_current_code_size(s);
> @@ -575,7 +574,6 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args,
>              /* Indirect jump method. */
>              TODO();
>          }
> -        tcg_debug_assert(args[0] < ARRAY_SIZE(s->tb_jmp_reset_offset));
>          s->tb_jmp_reset_offset[args[0]] = tcg_current_code_size(s);
>          break;
>      case INDEX_op_br:
> --
> 2.11.0

Applied to master as a buildfix; thanks.

-- PMM

      parent reply	other threads:[~2017-02-03 12:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-02 19:56 [Qemu-devel] [PATCH] tci: Remove invalid assertions Stefan Weil
2017-02-02 20:00 ` Eric Blake
2017-02-02 20:10   ` Stefan Weil
2017-02-02 20:25     ` Eric Blake
2017-02-02 22:12     ` Michael S. Tsirkin
2017-02-03 12:32 ` Peter Maydell [this message]

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='CAFEAcA81egoo-mgkXxjFOWgP3=aJf=RuXHdApTn+Zt98aXkA4w@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=sw@weilnetz.de \
    /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).