And since QLIST_REMOVE is defined as:
140 #define QLIST_REMOVE(elm, field) do { \
141 if ((elm)->field.le_next != NULL) \
142 (elm)->field.le_next->field.le_prev = \
143 (elm)->field.le_prev; \
144 *(elm)->field.le_prev = (elm)->field.le_next; \
145 } while (/*CONSTCOND*/0)
(gdb) p (notifier)->node.le_next
$5 = (struct Notifier *) 0x0
(gdb) p &(notifier->node)
$11 = (struct {...} *) 0x55d2f40c5080
There actually is a != NULL check, might it have changed on the fly.
I need to look at it more thoroughly, but it should be enough to recognize a known issue.
At the breaking function we have:
29 void notifier_ remove( Notifier *notifier) notifier, node);
30 {
31 QLIST_REMOVE(
32 }
(gdb) p notifier
$1 = (Notifier *) 0x55d2f40c5078
(gdb) p *notifier
$2 = {notify = 0x0, node = {le_next = 0x0, le_prev = 0x0}}
And since QLIST_REMOVE is defined as: >field. le_next != NULL) \ field.le_ next->field. le_prev = \ field.le_ prev; \ >field. le_prev = (elm)-> field.le_ next; \
140 #define QLIST_REMOVE(elm, field) do { \
141 if ((elm)-
142 (elm)->
143 (elm)->
144 *(elm)-
145 } while (/*CONSTCOND*/0)
(gdb) p (notifier) ->node. le_next
$5 = (struct Notifier *) 0x0
(gdb) p &(notifier->node)
$11 = (struct {...} *) 0x55d2f40c5080
There actually is a != NULL check, might it have changed on the fly.
I need to look at it more thoroughly, but it should be enough to recognize a known issue.