Re: [PATCH] Fix error in xen ring.h

2016-07-21 Thread Glauber Costa
On Thu, Jul 21, 2016 at 6:47 AM, Nadav Har'El wrote: > Hi Glauber, can you please review this patch, and perhaps propose a theory > why, if my patch is correct, things worked correctly before? > > I don't have a theory for why it worked before. Indeed the intended behavior here is the one you ha

Re: [PATCH] Fix error in xen ring.h

2016-07-21 Thread Nadav Har'El
Hi Glauber, can you please review this patch, and perhaps propose a theory why, if my patch is correct, things worked correctly before? Since the null pointer is often passed to this macro, it seems that the code before my patch would dereference it, and we should have seen a crash. I wonder why w

[PATCH] Fix error in xen ring.h

2016-07-20 Thread Nadav Har'El
The "&" character was strangely missing in the original code in the familiar idiom for calculating the offset of a field in a structure. I don't know how this code ever worked before, but it compiled and nobody noticed. In gcc 6, this error caused the compiler to complain about an illegal conversi