bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: please keep 'memmem' module simple


From: Simon Josefsson
Subject: Re: please keep 'memmem' module simple
Date: Wed, 09 Jan 2008 11:16:41 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux)

Bruno Haible <address@hidden> writes:

> Simon Josefsson wrote:
>> I reviewed the memmem situation for gnutls, and the recent changes are
>> somewhat large.  Memmem now pulls in:
>> 
>> ! lgl/m4/eealloc.m4
>> ! lgl/m4/malloca.m4
>> ! lgl/malloca.c
>> ! lgl/malloca.h
>> ! lgl/malloca.valgrind
>
> These are no longer pulled in, after Eric's rewrite.

That's good, this hadn't been committed when I tested.

>> What's worse is that the memmem module actually gets compiled on glibc
>> systems, causing the size increase on all users on our primary platform.
>
> Some users may want this, if they don't want their program to loop nearly
> endlessly if it happens to be fed unlucky strings. Some users may not want
> this.

For gnutls, the strings are always the same (X.509 PEM headers), and we
haven't seen such slowdowns even on large inputs (searching for a 10
byte needle in a 500kb input is, while not typical, not uncommon).  What
properties do unlucky strings have?

/Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]