bug-gnulib
[Top][All Lists]
Advanced

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

Re: glibc strstr regression


From: Bruno Haible
Subject: Re: glibc strstr regression
Date: Wed, 12 Sep 2018 23:51:35 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-134-generic; KDE/5.18.0; x86_64; ; )

Hi Eric,

> Urgh: https://sourceware.org/ml/libc-alpha/2018-09/msg00152.html says 
> glibc has releases with a broken strstr, and I don't think gnulib's 
> module is catching this particular bug.

Thanks for the heads-up. I've added this testcase to gnulib (see below).

According to 'git annotate', the bug originated in glibc on 2018-07-16.
Therefore gnulib's code is fine.

As for the detection of the bug: I understand from
https://sourceware.org/ml/libc-alpha/2018-09/msg00118.html
that the bug may be present or absent, depending on the precise CPU
model glibc is running on. Therefore, the usual kind of configure
test won't do it. We need to test whether the glibc version is = 2.28.
Right?

> At the same time, we may want 
> to sync some of glibc's enhancements to strstr back into gnulib

Well, no. I disagree. It was just discovered that the people who
currently modify the strstr code in glibc are not producing reliable
code, and that the test coverage of this code is lacking:
https://sourceware.org/bugzilla/show_bug.cgi?id=23631
I would therefore better _wait_ until the glibc people have improved
their test suite and possibly found other bugs, before doing the
merge glibc -> gnulib.


2018-09-12  Bruno Haible  <address@hidden>

        Add test case from a recent glibc bug.
        * tests/test-strstr.c (main): Add test of long needle.
        * tests/test-strcasestr.c (main): Likewise.
        * tests/test-c-strstr.c (main): Likewise.
        * tests/test-c-strcasestr.c (main): Likewise.
        * tests/test-memmem.c (main): Likewise.

2018-09-12  Bruno Haible  <address@hidden>

        Apply Eric Blake's improvements from 2011-02-25 to more tests.
        * tests/test-c-strstr.c (main): Add the same tests here as well.

2018-09-12  Bruno Haible  <address@hidden>

        Apply Jim Meyering's fix from 2015-01-11 to more tests.
        * tests/test-memmem.c (main): Free haystack.
        * tests/test-strcasestr.c (main): Likewise.
        * tests/test-c-strcasestr.c (main): Likewise.





reply via email to

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