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: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH] linux-user: avoid gcc array overrun warning for sparc
Date: Tue, 1 Feb 2011 18:02:32 +0000

On Tue, Feb 1, 2011 at 4:00 PM, Peter Maydell <address@hidden> wrote:
> 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...

Right, it was copied from Linux. I can't see where it was used.
UREG_FP use cases look OK.



reply via email to

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