
Thanks!
libsmi-cvs-20020109 Window 2000/cygwin/gcc-3.0.3
$ smidump.exe IUX_MIB.my IUX_MIB.my:7: parse error, unexpected `INTEGER' smidump: module `IUX_MIB.my' contains errors, expect flawed output // // This module has been generated by smidump 0.3.0. Do not edit. // module IUX-MIB {
Segmentation fault (core dumped)
1 IUX-MIB DEFINITIONS::= BEGIN 2 3 IMPORTS 4 enterprises FROM RFC1155-SMI 5 DisplayString FROM RFC1213-MIB 6 MODULE-IDENTITY, OBJECT-TYPE, 7 Counter, INTEGER, OBJECT-IDENTITY, 8 IpAddress, TimeTicks FROM SNMPv2-SMI; 9 10 ntels OBJECT IDENTIFIER ::= { enterprises 9608 } ...
Removing INTEGER made no problem. Only smidump crashed.
$ smilint IUX_MIB.my IUX_MIB.my:7: parse error, unexpected `INTEGER'
$ gdb (gdb) file smidump (gdb) run IUX_MIB.my Starting program: /usr/local/bin/smidump.exe IUX_MIB.my
Program received signal SIGSEGV, Segmentation fault. 0x00403176 in createImportList (smiModule=0xa016b08) at dump-sming.c:386
(gdb) bt #0 0x00403176 in createImportList (smiModule=0xa016b08) at dump-sming.c:386 #1 0x00403aee in fprintImports (f=0x6109925c, smiModule=0xa016b08) at dump-sming.c:622 #2 0x00405629 in dumpSming (modc=1, modv=0xa012688, flags=0, output=0x0) at dump-sming.c:1270 #3 0x00401e60 in main (argc=2, argv=0xa0117c0) at smidump.c:333 ...
-- !! 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.

Hi!
Kang, Jeongwon writes:
Jeongwon> $ smidump.exe IUX_MIB.my Jeongwon> IUX_MIB.my:7: parse error, unexpected `INTEGER' Jeongwon> smidump: module `IUX_MIB.my' contains errors, expect flawed output Jeongwon> // Jeongwon> // This module has been generated by smidump 0.3.0. Do not edit. Jeongwon> // Jeongwon> module IUX-MIB {
Jeongwon> Segmentation fault (core dumped)
In those cases where smilint signals severe errors (in this case a parse error should be reported), first fix the module, before using smidump. smidump can only handle correct modules correctly.
Of course, a segfault is always caused by a software bug. But the output of smidump would not be useful, even if the bug would be fixed.
-frank -- !! 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.

Frank Strauss writes:
Frank> Of course, a segfault is always caused by a software bug.
I will soon check in fixes for some of the dump drivers so that they won't crash in this particular case. The problem is that the parser in this particular case delivers imports with a NULL module name to the applications - and some are not well prepared to handle this. Would be nice if the parser would be smart to never ever do something like this...
/js -- !! 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 (3)
-
Frank Strauss
-
Juergen Schoenwaelder
-
Kang, Jeongwon