tcpdump mailing list archives

Re: [Fwd: Re: Thread Safe Lexer]


From: Eloy Paris <peloy () chapus net>
Date: Wed, 1 Jul 2009 16:16:55 -0400

Hi Gianluca,

On Wed, Jul 01, 2009 at 12:54:13PM -0700, Gianluca Varenni wrote:

----- Original Message ----- From: "Guy Harris" <guy () alum mit edu>
To: <tcpdump-workers () lists tcpdump org>
Sent: Wednesday, July 01, 2009 12:47 PM
Subject: Re: [tcpdump-workers] [Fwd: Re: Thread Safe Lexer]



On Jul 1, 2009, at 12:04 PM, Behdad Forghani wrote:

Gianluca asked me to forward this to the mailing list. During
Sharkfest09 he had mentioned that Winpcap cannot is not
re-entrant  and thread-safe because Lex uses global variables.
As you can see,  one solution to this is to use re2c for lexing
and lemon for  parsing. The link to re2c is:
http://re2c.org/
http://sourceforge.net/projects/re2c/

Newer versions of Flex can, I think, also generate reentrant C
lexers, but that would also require installing a new version of
Flex on some systems, so we'd have to require that you install
additional tools on some machines in either case.

By "newer versions" do you mean the version of flex that is shipped
with, let's say, an up-to-date Linux distribution like my Fedora 10?

I believe Flex has been able to generate re-entrant code for while now.
Fedora 10 shipped Flex 2.5.35, which is definitely able to generate
re-entrant code.

Even Fedora 7 has a Flex (2.5.33) capable of generating re-entrant code.

Cheers,

Eloy Paris.-
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: