[AGENT++] valgrind reports invalid write in agentpp

Jacquemin, Jean-Philippe jean-philippe.jacquemin at barco.com
Mon Nov 9 11:45:53 CET 2009


Dear All,
 
 
I am running valgrind on my snmpagent and it finds errors in the V3 Mib.
 
==2171== Invalid write of size 4
==2171==    at 0x806E891: Agentpp::Oidx::Oidx(char const*)
(snmp_pp_ext.h:145)
==2171==    by 0x80A4D98: __static_initialization_and_destruction_0(int,
int) (v3_mib.cpp:383)
==2171==    by 0x80A4E02:
_GLOBAL__I__ZN7Agentpp14V3SnmpEngineIDC2EPK4v3MP (v3_mib.cpp:1707)
==2171==    by 0x81272BC: (within
/home/jpja/jobs/snmpagent_s2/SNMP_Agent/DPAgent/src/snmpagent)
==2171==    by 0x8049B7F: (within
/home/jpja/jobs/snmpagent_s2/SNMP_Agent/DPAgent/src/snmpagent)
==2171==    by 0x8127258: __libc_csu_init (in
/home/jpja/jobs/snmpagent_s2/SNMP_Agent/DPAgent/src/snmpagent)
==2171==    by 0x41913EB: (below main) (in /lib/i686/cmov/libc-2.7.so)
==2171==  Address 0xbea4f2f8 is not stack'd, malloc'd or (recently)
free'd
 
==2171== Invalid write of size 4
==2171==    at 0x806E891: Agentpp::Oidx::Oidx(char const*)
(snmp_pp_ext.h:145)
==2171==    by 0x80A4DC9: __static_initialization_and_destruction_0(int,
int) (v3_mib.cpp:384)
==2171==    by 0x80A4E02:
_GLOBAL__I__ZN7Agentpp14V3SnmpEngineIDC2EPK4v3MP (v3_mib.cpp:1707)
==2171==    by 0x81272BC: (within
/home/jpja/jobs/snmpagent_s2/SNMP_Agent/DPAgent/src/snmpagent)
==2171==    by 0x8049B7F: (within
/home/jpja/jobs/snmpagent_s2/SNMP_Agent/DPAgent/src/snmpagent)
==2171==    by 0x8127258: __libc_csu_init (in
/home/jpja/jobs/snmpagent_s2/SNMP_Agent/DPAgent/src/snmpagent)
==2171==    by 0x41913EB: (below main) (in /lib/i686/cmov/libc-2.7.so)
==2171==  Address 0xbea4f2f8 is not stack'd, malloc'd or (recently)
free'd
 
 
After debugging I found out the problems come from the following piece
of code:
 
agentpp/src/v3_mib.cpp: 383
 
"
const Oidx UsmUserTable::auth_base = oidUsmAuthProtocolBase;
const Oidx UsmUserTable::priv_base = oidUsmPrivProtocolBase;
"
 
 
Has someone encountered this as well ?
What can be the solution ?
 
Best regards,
 
 
Jean-Philippe


DISCLAIMER:
Unless indicated otherwise, the information contained in this message is privileged and confidential, and is intended only for the use of the addressee(s) named above and others who have been specifically authorized to receive it. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message and/or attachments is strictly prohibited. The company accepts no liability for any damage caused by any virus transmitted by this email. Furthermore, the company does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. If you have received this message in error, please contact the sender and delete the message. Thank you.



More information about the AGENTPP mailing list