Access not within mapped region at address

mehdi KADIRI <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <1174560843.5081.13.camel@Ptitich>
Hi, 
I am using netsnmp 5.3 on readhat enterprise 4. 
I am writting an agentx sub agent and i am getting the following back
trace using valgrind :


 
Invalid read of size 1
==26756==    at 0x52ECBF: agentx_check_packet
(in /usr/lib/libnetsnmpagent.so.10.0.0)
==26756==    by 0x6A7F76: _sess_read (in /usr/lib/libnetsnmp.so.10.0.0)
==26756==    by 0x6A909B: snmp_sess_read
(in /usr/lib/libnetsnmp.so.10.0.0)
==26756==    by 0x6A90E9: snmp_read (in /usr/lib/libnetsnmp.so.10.0.0)
==26756==  Address 0x2 is not stack'd, malloc'd or (recently) free'd
==26756== 
==26756== Process terminating with default action of signal 11
(SIGSEGV): dumping core
==26756==  Access not within mapped region at address 0x2
==26756==    at 0x52ECBF: agentx_check_packet
(in /usr/lib/libnetsnmpagent.so.10.0.0)
==26756==    by 0x6A7F76: _sess_read (in /usr/lib/libnetsnmp.so.10.0.0)
==26756==    by 0x6A909B: snmp_sess_read
(in /usr/lib/libnetsnmp.so.10.0.0)
==26756==    by 0x6A90E9: snmp_read (in /usr/lib/libnetsnmp.so.10.0.0)
==26756== 
==26756== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 51 from
2)
==26756== malloc/free: in use at exit: 288679 bytes in 8985 blocks.
==26756== malloc/free: 77164 allocs, 68179 frees, 268354569 bytes
allocated.
==26756== For counts of detected errors, rerun with: -v
==26756== searching for pointers to 8985 not-freed blocks.
==26756== checked 12785220 bytes.

GDB gives : 
#0  0x0052ecbf in agentx_check_packet ()
from /usr/lib/libnetsnmpagent.so.10
(gdb) bt
#0  0x0052ecbf in agentx_check_packet ()
from /usr/lib/libnetsnmpagent.so.10
#1  0x006a7f77 in _sess_read () from /usr/lib/libnetsnmp.so.10
#2  0x006a909c in snmp_sess_read () from /usr/lib/libnetsnmp.so.10
#3  0x006a90ea in snmp_read () from /usr/lib/libnetsnmp.so.10
#4  0x006807e4 in snmp_synch_response_cb ()
from /usr/lib/libnetsnmp.so.10
#5  0x1cb0b35b in ?? ()
#6  0x00000000 in ?? ()


I din't know if it is my bug or a netsnmp bug.
Can anyone help me please?

Thanks






-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.