emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#71470: closed (test failure on CentOS 7)


From: GNU bug Tracking System
Subject: bug#71470: closed (test failure on CentOS 7)
Date: Tue, 11 Jun 2024 16:04:01 +0000

Your message dated Tue, 11 Jun 2024 09:03:37 -0700
with message-id <6a2ea294-3d89-4c36-a85a-90759ba2f84d@cs.ucla.edu>
and subject line Re: bug#71470: test failure on CentOS 7
has caused the debbugs.gnu.org bug report #71470,
regarding test failure on CentOS 7
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
71470: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71470
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: test failure on CentOS 7 Date: Mon, 10 Jun 2024 13:56:07 +0200
Building the current grep (git master) with the current Gnulib, I see a test
failure on CentOS 7:


FAIL: test-mbrlen-1.sh
======================

../../gnulib-tests/test-mbrlen.c:47: assertion 'ret == (size_t)(-2)' failed
../../gnulib-tests/test-mbrlen-1.sh: line 5: 31796 Aborted                 
(core dumped) LC_ALL=C ${CHECKER} ./test-mbrlen${EXEEXT} 1
FAIL test-mbrlen-1.sh (exit status: 1)


The background is that mbrlen, on glibc systems <= 2.19, has a bug [1]:
This function returns 0 instead of @code{(size_t) -2} when the input
is empty.
This affects old distros:
  - CentOS 7 (glibc 2.17),
  - Slackware 14 (glibc 2.15),
  - openSUSE 12.1 (glibc 2.14.1),
  - etc.

mbrtowc has the same bug.

Gnulib has workarounds against this bug both in mbrlen and mbrtowc.

But grep deactivates the workaround for mbrtowc, in order not to
slow down 'grep' [2]. When this commit was created, Gnulib had a
mbrtowc-tests module. Now, since 2023-03-30, it also has an mbrlen-tests
module, and it is not deactivated. It fails because
  - mbrlen.m4 detects that mbrlen has the bug.
  - So it activates the replacement REPLACE_MBRLEN=1.
  - The replacement invokes mbrtowc.
  - But mbrtowc is not fixed, due to [2].

I see two reasonable fixes:

a) Remove the special optimization for CentOS 7. This distro will become
unsupported in less than a month [3], therefore it is no longer necessary
to carry complexity to optimize it.
-> patch 0001-maint-Remove-special-optimization-for-CentOS-7.patch

b) Extend the special optimization also to the mbrlen function and tests.
-> 0001-maint-Avoid-test-mbrlen-1.sh-failure-on-CentOS-7.patch

For each of the fixes, find a proposed patch (untested) attached.

Bruno

[1] https://www.gnu.org/software/gnulib/manual/html_node/mbrlen.html
[2] 
https://git.savannah.gnu.org/gitweb/?p=grep.git;a=commitdiff;h=6e319a818ed7b15b452ed2baab2f6a38d42fd1fe
[3] 
https://git.savannah.gnu.org/gitweb/?p=gnulib/maint-tools.git;a=blob;f=end-of-life.txt;h=5b7ff5559f3ddc9ea753f7837c35e8efbe0a8100;hb=HEAD

Attachment: 0001-maint-Remove-special-optimization-for-CentOS-7.patch
Description: Text Data

Attachment: 0001-maint-Avoid-test-mbrlen-1.sh-failure-on-CentOS-7.patch
Description: Text Data


--- End Message ---
--- Begin Message --- Subject: Re: bug#71470: test failure on CentOS 7 Date: Tue, 11 Jun 2024 09:03:37 -0700 User-agent: Mozilla Thunderbird Thanks for the report and fixes. Close call, but since CentOS 7 is still officially alive I installed the 2nd patch. (A plus is that 'configure' is a bit faster....)


--- End Message ---

reply via email to

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