[Winpcap-users] pcap_compile leak?

Paul Heil paul.heil at gmail.com
Wed Sep 26 14:32:18 GMT 2007


So, the problem isn't that I've forgotten to release memory in my code, it's
a register leak in the PCAP
code? That I can work around, so that's good news for me. I just
wanted to make sure I wasn't doing something wrong.


Thanks,
Paul

On 9/25/07, Guy Harris <guy at alum.mit.edu> wrote:
>
>
> On Sep 25, 2007, at 3:52 PM, Paul Heil wrote:
>
> > I have a pcap application that uses a filter (as below). The 15th
> > time I call pcap_compile(), it fails with the error "too many
> > registers needed to evaluate expression".
>
> Wow.  I thought I fixed that one in *2001*:
>
>         revision 1.161
>         date: 2001-12-18 01:10:49 -0800;  author: guy;  state:
> Exp;  lines:
> +2 -1
>         Free up both "registers" (scratch memory locations, really) used
> by an
>         arithmetic expression in a filter; otherwise, we leak registers
> when
>         compiling arithmetic expressions.
>
> > I'm using PCAP v4.0.1 and developer pack 4.0.1.
>
> WinPcap 4.0.1 should be based on a version of libpcap with that fix
> (which first showed up in libpcap 0.8); perhaps there's another place
> where the code generator leaks registers.
>
> > Is there a call other than pcap_freecode() I should be using to free
> > the memory allocated in the pcap_compile() command?
>
> No.  This leak isn't a memory leak, so pcap_freecode() won't help.
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20070926/848f8e99/attachment.htm


More information about the Winpcap-users mailing list