
On Sat, Apr 11, 2015 at 05:51:18PM +0100, Tomalak Geret'kal wrote:
Hi
I've been trying to build libsmi trunk for x86_64-w64-mingw32 and I've encountered a problem. I don't know whether the MIB I'm trying to load has some invalidity, though it's a CISCO MIB and smilint accepts it. Presumably I have done something wrong elsewhere and will look into that separately.
Regardless, the particular segfault I received led me to this code (lib/parser-smi.y:2420), which seems strange:
if (!($11)) smiPrintError(thisParserPtr, ERR_INTERNAL); /* * Otherwise, we have to allocate a * new Type struct, inherited from $10. */ $$ = duplicateType($11, 0, thisParserPtr);
duplicateType (lib/smi-data.c:2404) unconditionally dereferences its first parameter so, since $11 is invalid in this block, the call to duplicateType is broken.
Yep, this looks broken.
What is this code supposed to be instead?
Can you send me (privately) the MIB file that triggers this problem? This might help me to figure out what should be hapening here. This is the only place where the parser - actually the whole libsmi library - throws an internal error...
/js