
Hi,
I can confirm this behavior - though with different mibs - with 0.4.1 and with a cvs version from a couple of months ago or so. I tried to identify where exactly the crash occures but I couldn't find it, the stack trace was showing different crashing points and I finally gave up (I was using Windows). So thanks a lot for identifying the problem, I hope this fix - or other - will soon be merged in the official tree, if it's not yet fixed in 0.4.2 as I didn't have a chance to test it.
Regards, Sorin
This is from someone in my company using libsmi, but not on the mailing list. This problem may have been fixed already, as this is with Lib SMI 0.4.1.
Pete
========
I have attached two simple MIB files FOO-TEST-MIB and FOO-CORP-MIB1 (sic) the �1� is appended so that it is not automatically imported when loading FOO-TEST-MIB.
The Problem: FOO-TEST-MIB top node (fooTest) is defined in terms of fooProductOID which is imported from FOO-CORP-MIB. If the corp mib is not in SMI path nor previously imported, there is an error correctly reported regarding 1) the inability to find the module but also 2) the lack of parent node for fooTest. This is fine but, subsequently attempting to load FOO-CORP-MIB1 causes a problem during setObjectName mergeNodeTrees call that ultimately results in a crash due to objectPtr remaining on lists after being freed.
I have also included a revised version of 'setObjectName' which seems to work for me. I have not studied the data structures and relationships between objects in great detail, so, I suspect this is not the best solution nor a complete solution. However, it performed perfectly in all of my test cases. If you have time to analyze it and recommend a better fix, I would greatly appreciate it. You are free to use this code for libsmi if it is, in fact, a valid solution.
Sincerely, Ted Latonik Melbourne, FL USA
[Code snipped]
______________________________________________________________________ Do you want a free e-mail for life ? Get it at http://www.email.ro/
participants (1)
-
soso