[Nut-upsdev] upsd segfault.
Arjen de Korte
nut+devel at de-korte.org
Mon Dec 22 16:13:31 UTC 2008
Citeren Kjell Claesson <kjell.claesson at epost.tidanet.se>:
> And I don't understand why it is calling st_tree_node_add as it is going to
> remove the alarm node and the status alarm.
Most likely, a variable in the state tree is removed when the ALARM is
cleared. This means that state_delinfo() will remove a variable. If
the present state of the tree is such that the node->left in line 126
is a NULL pointer (nothing to the left of this node, perfectly valid),
this will lead to problems in line 91, when we reference sptr->var.
That doesn't fly if (sptr == NULL).
Best regards, Arjen
PS This code was reworked to get rid of the recursion in these
functions. Since there is nothing implemented to limit recursion
depth, this was a bit dangerous.
--
Please keep list traffic on the list
More information about the Nut-upsdev
mailing list