Re: socketcall.sendmsg(msg.msg_control) points to uninitialised byte(s)
Largo <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Recompiling everything, was one of the first things I've tried. The problem started in fact when I upgraded the gcc compiler. So then I upgraded all the libraries also and rebuild everything. I upgraded net-snmp from 5.4 to 5.4.1. I also tried switching back to 5.4, but I still get the problem. I'm really puzzled what the cause of this problem is and I've spent already 2 days looking for it. Let me try to explain a bit better what happens exactly: - I have a function snmpget, where I call snmp_send. This is where I get the valgrind warning. - It's an asynchronous call. So a bit later, I call the callbackfunction. There it looks normal, I get my snmpvalues as expected. But I get a segmentation fault when I exit the calling function. So I suspect that the origin of the crash is the problem in the valgrind warning. When I debug, I see the following: snmp_sess_async_send (sessp=0xb461c08, pdu=0xb6d2008, callback=0, cb_data=0x0) at snmp_api.c:4892 And when sendmsg is called I see: netsnmp_udp_send (t=0xb469098, buf=0xb474255, size=51, opaque=0xb6cd2b4, olength=0xb6cd2b8) at snmpUDPDomain.c:249 The parameters look normal, right? 2008/6/3 Dave Shield <[email protected]>: > 2008/6/3 Largo <[email protected]>: > > 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. > > > > 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? > > Run the program under a debugger, and trigger the crash. > Then look at the code in snmp_sess_async_send() > and see if you can spot anything suspicious in the > parameters to the sendmsg() call. > > It might also be worth re-compiling the 'poller' application, > to make sure it's linking with the Net-SNMP libraries correctly. > > You say that you've upgraded the Net-SNMP libraries recently? > From what version? > > Dave > ------------------------------------------------------------------------- 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