[prev in list] [next in list] [prev in thread] [next in thread]
List: winpcap-users
Subject: Re: [Winpcap-users] pcap_compile leak?
From: "Paul Heil" <paul.heil () gmail ! com>
Date: 2007-09-26 14:32:18
Message-ID: 2fc4ff370709260732t4a6223f6o7a0762854458c98e () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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@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@winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users
>
[Attachment #5 (text/html)]
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 go \
od news for me. I just wanted to make sure I wasn't doing something wrong. \
<br><br>Thanks,<br>Paul<br><br><div><span class="gmail_quote">On 9/25/07, <b \
class="gmail_sendername">Guy Harris</b> <<a \
href="mailto:guy@alum.mit.edu">guy@alum.mit.edu</a>> wrote:</span><blockquote \
class="gmail_quote" style="margin-top: 0; margin-right: 0; margin-bottom: 0; \
margin-left: 0; margin-left: 0.80ex; border-left-color: #cccccc; border-left-width: \
1px; border-left-style: solid; padding-left: 1ex"> <br>On Sep 25, 2007, at 3:52 PM, \
Paul Heil wrote:<br><br>> I have a pcap application that uses a filter (as below). \
The 15th<br>> time I call pcap_compile(), it fails with the error "too \
many<br>> registers needed to evaluate expression". <br><br>Wow. I \
thought I fixed that one in \
*2001*:<br><br> revision \
1.161<br> date: 2001-12-18 01:10:49 \
-0800; author: guy; state: Exp; lines:<br>+2 \
-1<br> Free up both \
"registers" (scratch memory locations, really) used by an \
<br> arithmetic expression in a \
filter; otherwise, we leak registers \
when<br> compiling arithmetic \
expressions.<br><br>> I'm using PCAP v4.0.1 and developer pack \
4.0.1.<br><br>WinPcap 4.0.1 should be based on a version of libpcap with that fix \
<br>(which first showed up in libpcap 0.8); perhaps there's another \
place<br>where the code generator leaks registers.<br><br>> Is there a call other \
than pcap_freecode() I should be using to free<br>> the memory allocated in the \
pcap_compile() command? <br><br>No. This leak isn't a memory leak, so \
pcap_freecode() won't \
help.<br>_______________________________________________<br>Winpcap-users mailing \
list<br><a href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org \
</a><br><a href="https://www.winpcap.org/mailman/listinfo/winpcap-users">https://www.winpcap.org/mailman/listinfo/winpcap-users</a><br></blockquote></div><br>
_______________________________________________
Winpcap-users mailing list
Winpcap-users@winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic