これは、.pcap
ファイルの解析に使用するプログラムの Valgrind 出力です。
残念ながら、ここにプログラムのソースを貼り付けることはできません...問題は、memcpy(...)
呼び出しがないということですplugin_input_get_flow(...)
。valgrindなしでプログラムを実行すると、完全に機能します。これは可能ですか?libpcapライブラリを間違った方法で使用していることを示していますか
Invalid write of size 1
==18228== at 0x4A08877: memcpy (mc_replace_strmem.c:587)
==18228== by 0x5229E9A: plugin_input_get_flow (in /home/flowmon/ipfix/flowmon-http-plugins-1.0/src/input-http/.libs/flowmon-input-http.so)
==18228== by 0x409EA0: sw_get_flow_thread (in /usr/bin/flowmonexp)
==18228== by 0x363600673C: start_thread (in /lib64/libpthread-2.5.so)
==18228== by 0x36354D3D1C: clone (in /lib64/libc-2.5.so)
==18228== Address 0xc3d2d5f is 1 bytes before a block of size 568 alloc'd
==18228== at 0x4A0610C: malloc (vg_replace_malloc.c:195)
==18228== by 0x3635461709: __fopen_internal (in /lib64/libc-2.5.so)
==18228== by 0x3635C13A5C: pcap_open_offline (in /usr/lib64/libpcap.so.0.9.4)
==18228== by 0x5229A3A: plugin_input_init (in /home/flowmon/ipfix/flowmon-http-plugins-1.0/src/input-http/.libs/flowmon-input-http.so)
==18228== by 0x40974C: sw_init (in /usr/bin/flowmonexp)
==18228== by 0x4115B5: main (in /usr/bin/flowmonexp)
==18228==
==18228== Invalid write of size 1
==18228== at 0x4A0887D: memcpy (mc_replace_strmem.c:587)
==18228== by 0x5229E9A: plugin_input_get_flow (in /home/flowmon/ipfix/flowmon-http-plugins-1.0/src/input-http/.libs/flowmon-input-http.so)
==18228== by 0x409EA0: sw_get_flow_thread (in /usr/bin/flowmonexp)
==18228== by 0x363600673C: start_thread (in /lib64/libpthread-2.5.so)
==18228== by 0x36354D3D1C: clone (in /lib64/libc-2.5.so)
==18228== Address 0xc3d2d5e is 2 bytes before a block of size 568 alloc'd
==18228== at 0x4A0610C: malloc (vg_replace_malloc.c:195)
==18228== by 0x3635461709: __fopen_internal (in /lib64/libc-2.5.so)
==18228== by 0x3635C13A5C: pcap_open_offline (in /usr/lib64/libpcap.so.0.9.4)
==18228== by 0x5229A3A: plugin_input_init (in /home/flowmon/ipfix/flowmon-http-plugins-1.0/src/input-http/.libs/flowmon-input-http.so)
==18228== by 0x40974C: sw_init (in /usr/bin/flowmonexp)
==18228== by 0x4115B5: main (in /usr/bin/flowmonexp)
==18228==
==18228== Invalid write of size 1
==18228== at 0x4A08884: memcpy (mc_replace_strmem.c:587)
==18228== by 0x5229E9A: plugin_input_get_flow (in /home/flowmon/ipfix/flowmon-http-plugins-1.0/src/input-http/.libs/flowmon-input-http.so)
==18228== by 0x409EA0: sw_get_flow_thread (in /usr/bin/flowmonexp)
==18228== by 0x363600673C: start_thread (in /lib64/libpthread-2.5.so)
==18228== by 0x36354D3D1C: clone (in /lib64/libc-2.5.so)
==18228== Address 0xc3d2d5d is 3 bytes before a block of size 568 alloc'd
==18228== at 0x4A0610C: malloc (vg_replace_malloc.c:195)
==18228== by 0x3635461709: __fopen_internal (in /lib64/libc-2.5.so)
==18228== by 0x3635C13A5C: pcap_open_offline (in /usr/lib64/libpcap.so.0.9.4)
==18228== by 0x5229A3A: plugin_input_init (in /home/flowmon/ipfix/flowmon-http-plugins-1.0/src/input-http/.libs/flowmon-input-http.so)
==18228== by 0x40974C: sw_init (in /usr/bin/flowmonexp)
==18228== by 0x4115B5: main (in /usr/bin/flowmonexp)
==18228==
==18228== Invalid write of size 1
==18228== at 0x4A0888F: memcpy (mc_replace_strmem.c:587)
==18228== by 0x5229E9A: plugin_input_get_flow (in /home/flowmon/ipfix/flowmon-http-plugins-1.0/src/input-http/.libs/flowmon-input-http.so)
==18228== by 0x409EA0: sw_get_flow_thread (in /usr/bin/flowmonexp)
==18228== by 0x363600673C: start_thread (in /lib64/libpthread-2.5.so)
==18228== by 0x36354D3D1C: clone (in /lib64/libc-2.5.so)
==18228== Address 0xc3d2d5c is 4 bytes before a block of size 568 alloc'd
==18228== at 0x4A0610C: malloc (vg_replace_malloc.c:195)
==18228== by 0x3635461709: __fopen_internal (in /lib64/libc-2.5.so)
==18228== by 0x3635C13A5C: pcap_open_offline (in /usr/lib64/libpcap.so.0.9.4)
==18228== by 0x5229A3A: plugin_input_init (in /home/flowmon/ipfix/flowmon-http-plugins-1.0/src/input-http/.libs/flowmon-input-http.so)
==18228== by 0x40974C: sw_init (in /usr/bin/flowmonexp)
==18228== by 0x4115B5: main (in /usr/bin/flowmonexp)