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

Re: [Xen-devel] [PATCH] blktap2: update connection handling to fix build with gcc5



>>> On 21.07.15 at 08:32, <olaf@xxxxxxxxx> wrote:
> On Mon, Jul 20, Wei Liu wrote:
> 
>> On Mon, Jul 20, 2015 at 11:16:34AM +0200, Olaf Hering wrote:
>> > On Mon, Jul 20, Jan Beulich wrote:
>> > 
>> > > >>> On 19.07.15 at 11:33, <olaf@xxxxxxxxx> wrote:
>> > > > [  198s] block-log.c:549:23: error: array subscript is above array 
>> > > > bounds 
> [-Werror=array-bounds]
>> > > > [  198s]      if (s->connections[i].id == id)
>> > > > [  198s]                        ^
>> > > 
>> > > So what makes the compiler right with that complaint? I.e. how does
>> > > it know i > 0 here? After all - afaict - s->connected can only be 0 or
>> > 
>> > It has to assume that ->connected can get any value because the input
>> > comes from outside the unit.
>> > 
>> > To reduce the patch size "&& i < MAX_CONNECTIONS" could be added.
>> > 
>> 
>> A smaller patch would be preferable at this stage.
> 
> I disagree with that.

Please consider that we're in code freeze right now.

> What is the longterm goal of that binary?

It being mostly unmaintained, it's probably a candidate for removal
not too far in the future. Which would be another reason again
extensive changes.

But anyway, the primary question remains - isn't what you're seeing
a compiler bug? If yes, that's imo _yet another_ reason for doing a
minimal workaround (if any at all).

Jan


_______________________________________________
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®.