[Top][All Lists]

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

strstr (was: test-memchr crash)

From: Eric Blake
Subject: strstr (was: test-memchr crash)
Date: Tue, 16 Jun 2009 19:13:13 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20090302 Thunderbird/ Mnenhy/

Hash: SHA1

According to Eric Blake on 6/16/2009 6:16 AM:
> Oh.  That's because your strstr is already non-linear (your glibc 2.7 is
> older than when they picked up my strstr implementation, around Feb 2008
> and glibc 2.9).  So there's only a narrow window of time where glibc has
> the new strstr that uses memchr with an overestimated length, but also has
> a broken memchr, and we have not yet run into a host in the wild in that
> category other than the Debian bug report.

Hmm.  I'm now starting to wonder whether I should create a new module
strstr-simple, which fixes broken strstr (in the presence of broken
memchr) but without worrying about quadratic vs. linear (similar to
strcasestr-simple which only worries about providing strcasestr on
platforms that lack it, compared to strcasestr which worries about speed).

Also, since we know strstr and strcasestr are broken on various glibc
versions, it seems like we should add dependencies of client modules
(argz.c, gen-uni-tables.c, mountlist.c all use strstr; I didn't see any
use of strcasestr); but should this be on the new strstr-simple module, or
the fullblown strstr module?.

I still think it would be interesting to get my hands on one of the
machines like in the Debian report, so that I could also test whether
printf("%.*s",...) segfaults on an appropriately fenced string.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


reply via email to

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