On Thu 07-11-13 13:38:00, Andrew Morton wrote:
> On Wed, 6 Nov 2013 17:42:30 -0800 Cody P Schafer
> wrote:
>
> > The iterator rbtree_postorder_for_each_entry_safe() relies on pointer
> > underflow behavior when testing for loop termination. In particular
> > it expects that
> > &rb_entry(NULL
On 11/07/2013 01:38 PM, Andrew Morton wrote:
On Wed, 6 Nov 2013 17:42:30 -0800 Cody P Schafer
wrote:
The iterator rbtree_postorder_for_each_entry_safe() relies on pointer
underflow behavior when testing for loop termination. In particular
it expects that
&rb_entry(NULL, type, field)->fiel
On Wed, 6 Nov 2013 17:42:30 -0800 Cody P Schafer
wrote:
> The iterator rbtree_postorder_for_each_entry_safe() relies on pointer
> underflow behavior when testing for loop termination. In particular
> it expects that
> &rb_entry(NULL, type, field)->field
> is NULL. But the result of this expre
On 11/07/2013 03:51 AM, Michel Lespinasse wrote:
On Wed, Nov 6, 2013 at 5:42 PM, Cody P Schafer wrote:
From: Jan Kara
[...]
+#define rb_entry_safe(ptr, type, member) \
+ ({ typeof(ptr) ptr = (ptr); \
+ ptr ? rb_entry(ptr, type, member) : NULL; \
+ })
+
/*
On Wed, Nov 6, 2013 at 5:42 PM, Cody P Schafer wrote:
> From: Jan Kara
>
> The iterator rbtree_postorder_for_each_entry_safe() relies on pointer
> underflow behavior when testing for loop termination. In particular
> it expects that
> &rb_entry(NULL, type, field)->field
> is NULL. But the resul
From: Jan Kara
The iterator rbtree_postorder_for_each_entry_safe() relies on pointer
underflow behavior when testing for loop termination. In particular
it expects that
&rb_entry(NULL, type, field)->field
is NULL. But the result of this expression is not defined by a C standard
and some gcc ver
6 matches
Mail list logo