
Jochen Friedrich jochen@scram.de writes:
it looks like some nodes may get corrupted if multiple SMI files are loaded. This example dumps core for me: [...] smiLoadModule("RFC1213-MIB"); [...] /* This call crashes with a nice little core :) */ node = smiGetNode("ifAdminStatus", NULL); [...]
This seems to be exactly that bug, I've also found last friday. ;-) I think I've tracked down to the real cause.
It happens when an an access to a node takes place, that is defined in multiple modules (here RFC1213-MIB, and RFC1158-MIB, which is imported by RFC-1212, which in turn is imported by RFC1213-MIB). Subtrees are stored below a `pending' tree as long as their parent is unknown due to forward references that are allowed in SMIv1/v2. When the parent gets defined the subtree gets moved to the main node tree. But this is incorrect: it must be *merged into* the main tree, because another module may have defined these nodes already. Hence, pointers from Objects of previously loaded modules to a node get invalid.
I have to build a recursive tree merge function in data.c paying attention to some pointer adjustments. I hope to fix this problem today or tomorrow. -- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to libsmi-request@ibr.cs.tu-bs.de. !! See http://www.ibr.cs.tu-bs.de/projects/libsmi/ for more information.
participants (1)
-
Frank Strauss