From: Tom Musta <tommusta@gmail.com>
To: Stuart Brady <sdb@zubnet.me.uk>, qemu-trivial@nongnu.org
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH] target-ppc: Fix overallocation of opcode tables
Date: Wed, 19 Mar 2014 10:14:00 -0500 [thread overview]
Message-ID: <5329B438.7090104@gmail.com> (raw)
In-Reply-To: <20140319140726.GA9192@zubnet.me.uk>
On 3/19/2014 9:07 AM, Stuart Brady wrote:
> create_new_table() should allocate 0x20 opc_handler_t pointers, but
> actually allocates 0x20 opc_handler_t structs. Fix this.
>
> Signed-off-by: Stuart Brady <sdb@zubnet.me.uk>
> ---
> translate_init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
> index 6084f40..75f34c1 100644
> --- a/target-ppc/translate_init.c
> +++ b/target-ppc/translate_init.c
> @@ -7434,7 +7434,7 @@ static int create_new_table (opc_handler_t **table, unsigned char idx)
> {
> opc_handler_t **tmp;
>
> - tmp = g_malloc(0x20 * sizeof(opc_handler_t));
> + tmp = g_new(opc_handler_t *, 0x20);
> fill_new_table(tmp, 0x20);
> table[idx] = (opc_handler_t *)((uintptr_t)tmp | PPC_INDIRECT);
>
Reviewed-by: Tom Musta <tommusta@gmail.com>
Tested-by: Tom Musta <tommusta@gmail.com>
next prev parent reply other threads:[~2014-03-19 15:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-19 14:07 [Qemu-devel] [PATCH] target-ppc: Fix overallocation of opcode tables Stuart Brady
2014-03-19 15:14 ` Tom Musta [this message]
2014-03-19 22:19 ` [Qemu-devel] [Qemu-ppc] " Andreas Färber
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=5329B438.7090104@gmail.com \
--to=tommusta@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=sdb@zubnet.me.uk \
/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).