Segfault in snmp_oid_compare ()
=?ks_c_5601-1987?B?sei8usij?= <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <009301c9cde9$00fc2b50$02f481f0$@com> |
I¡¯m using net-snmp-5.4.1 for my program
While I run the program, it crashed while updating the table and crashed
Here is my gdb trace
#0 0x00597bda in snmp_oid_compare () from /usr/lib/libnetsnmp.so.15
#1 0x005e4f57 in netsnmp_compare_netsnmp_index () from /usr/lib/libnetsnmp.
so.15
#2 0x005e5d04 in netsnmp_container_get_binary_array () from
/usr/lib/libnetsnmp.so.15
#3 0x005e5dfd in netsnmp_container_get_binary_array () from
/usr/lib/libnetsnmp.so.15
#4 0x005e6300 in netsnmp_binary_array_release () from
/usr/lib/libnetsnmp.so.15
#5 0x005e4c65 in CONTAINER_INSERT () from /usr/lib/libnetsnmp.so.15
#6 0x008e8a8c in netsnmp_tdata_add_row () from
/usr/lib/libnetsnmphelpers.so.15
#7 0x0806d867 in lsmCRDPTable_createEntry (table_data=0x930b938,
lsmCRDPTransactionID={high = 21054, low = 2779681052},
lsmCRDPFileName=0x936be2c "M3031539SGL0000000.mpg.cim2t.mpg",
lsmCRDPFileName_len=32, lsmCRDPServerID=2) at lsmCRDPTable.cpp:96
#8 0x08074720 in UpdateThread::UpdateCRDPStatusList (this=0x80dafc0) at
UpdateThread.cpp:479
#9 0x08074ab5 in UpdateThread::OnUpdate (this=0x80dafc0) at
UpdateThread.cpp:107
#10 0x08074af9 in UpdateThread::Run (this=0x80dafc0) at UpdateThread.cpp:54
#11 0x080a2488 in CCiThread2::ThreadProc (this=0x80dafc0) at
../Src/CiThread2.cpp:200
#12 0x080a229a in _CiThread2Entry (pParam=0x80dafc0) at
../Src/CiThread2.cpp:35
#13 0x00c113b6 in start_thread () from /lib/libpthread.so.0
#14 0x00b5d33e in clone () from /lib/libc.so.6
And source code is
netsnmp_tdata_row *
lsmCRDPTable_createEntry(netsnmp_tdata * table_data,
U64 lsmCRDPTransactionID, char *lsmCRDPFileName,
size_t lsmCRDPFileName_len,
u_long lsmCRDPServerID)
{
struct lsmCRDPTable_entry *entry;
netsnmp_tdata_row *row;
entry = SNMP_MALLOC_TYPEDEF(struct lsmCRDPTable_entry);
if (!entry)
return NULL;
row = netsnmp_tdata_create_row();
if (!row) {
SNMP_FREE(entry);
return NULL;
}
row->data = entry;
entry->lsmCRDPTransactionID = lsmCRDPTransactionID;
netsnmp_tdata_row_add_index(row, /*ASN_COUNTER64*/ASN_OPAQUE,
&(entry->lsmCRDPTransactionID),
sizeof(entry->lsmCRDPTransactionID));
memcpy(entry->lsmCRDPFileName, lsmCRDPFileName, lsmCRDPFileName_len);
entry->lsmCRDPFileName_len = lsmCRDPFileName_len;
netsnmp_tdata_row_add_index(row, ASN_OCTET_STR,
entry->lsmCRDPFileName,
lsmCRDPFileName_len);
entry->lsmCRDPServerID = lsmCRDPServerID;
netsnmp_tdata_row_add_index(row, ASN_UNSIGNED,
&(entry->lsmCRDPServerID),
sizeof(entry->lsmCRDPServerID));
netsnmp_tdata_add_row(table_data, row);
return row;
}
I tried to fix this problem but failed¡¦
It seems to be a problem caused by invalid pointer netsnmp_tdata *
table_data
but I couldn¡¯t find exact reason
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users