qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] linux-user: avoid gcc array overrun warning for


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] linux-user: avoid gcc array overrun warning for sparc
Date: Tue, 1 Feb 2011 16:00:10 +0000

On 1 February 2011 15:54, Peter Maydell <address@hidden> wrote:
> --- a/linux-user/signal.c
> +++ b/linux-user/signal.c
> @@ -1817,9 +1817,10 @@ struct target_sigcontext {
>  /* A Sparc stack frame */
>  struct sparc_stackf {
>         abi_ulong locals[8];
> -        abi_ulong ins[6];
> -        struct sparc_stackf *fp;
> -        abi_ulong callers_pc;
> +        abi_ulong ins[8];
> +        /* It's simpler to treat fp and callers_pc as elements of ins[]
> +         * since we never need to access them ourselves.
> +         */
>         char *structptr;

Incidentally, I think the presence of a host pointer in a target
structure definition is a (different) bug which might cause problems
when the target and host have different pointer sizes...

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]