Hi all,

I have a program which makes use of the net-snmp 5.4.1 API. This program
worked fine until recently. I've updated some libraries (including net-snmp)
and now my program crashes because of a segmentation fault. I've been
investigating and found that the crash is probably related to a problem with
net-snmp. Using valgrind, I see following error just before the crash:

==29356== Thread 1:
==29356== Syscall param socketcall.sendmsg(msg.msg_control) points to
uninitialised byte(s)
==29356==    at 0x40C9F78: sendmsg (in /lib/libpthread-0.10.so)
==29356==    by 0x80F6E88: snmp_sess_async_send (snmp_api.c:4892)
==29356==    by 0x80F73F3: snmp_send (snmp_api.c:4657)
==29356==    by 0x805D92A: snmp::snmpget(std::string, std::string,
std::string) (in /usr/bin/poller/poller)
==29356==    by 0x8056E1F: Poller::runPoller() (in /usr/bin/poller/poller)
==29356==    by 0x804E4E6: Config::RunNextPollers() (in
/usr/bin/poller/poller)
==29356==    by 0x804F303: Config::handle(OTC_Event*) (in
/usr/bin/poller/poller)
==29356==    by 0x80A5D78: OTC_EVAgent::filter(OTC_Event*) (in
/usr/bin/poller/poller)
==29356==    by 0x80A5D56: OTC_EVAgent::execute(OTC_Event*) (in
/usr/bin/poller/poller)
==29356==    by 0x80A5D34: OTC_EVAgent::accept(OTC_Event*) (in
/usr/bin/poller/poller)
==29356==    by 0x80A701C: OTC_Event::deliver(int) (in
/usr/bin/poller/poller)
==29356==    by 0x80A742E: OTC_EventJob::execute() (in
/usr/bin/poller/poller)
==29356==  Address 0xBEFE7F80 is on thread 1's stack

The parameter values used in snmp_send seem to be ok. If I comment out the
snmp_send line, my program does not crash.

Anybody an idea what the problem could be or what I can do to find the
source of the problem?

kind regards,
Largo
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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

Reply via email to