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

Re: [Xen-devel] xen/x86: unable to build with gcc5



>>> On 13.03.15 at 13:25, <ian.campbell@xxxxxxxxxx> wrote:
> From: Ian Campbell <ian.campbell@xxxxxxxxxx>
> Date: Fri, 13 Mar 2015 12:22:25 +0000
> Subject: [PATCH] xen: common: Use unbounded array for symbols_offset.
> 
> Using a singleton array causes gcc5 to report:
> symbols.c: In function 'symbols_lookup':
> symbols.c:128:359: error: array subscript is above array bounds 
> [-Werror=array-bounds]
> symbols.c:136:176: error: array subscript is above array bounds 
> [-Werror=array-bounds]
> 
> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

> ---
>  xen/common/symbols.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/common/symbols.c b/xen/common/symbols.c
> index bc2fde6..fc7c9e7 100644
> --- a/xen/common/symbols.c
> +++ b/xen/common/symbols.c
> @@ -19,7 +19,7 @@
>  #include <xen/spinlock.h>
>  
>  #ifdef SYMBOLS_ORIGIN
> -extern const unsigned int symbols_offsets[1];
> +extern const unsigned int symbols_offsets[];
>  #define symbols_address(n) (SYMBOLS_ORIGIN + symbols_offsets[n])
>  #else
>  extern const unsigned long symbols_addresses[];
> -- 
> 2.1.4




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.