<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/glibc.git/string, branch ibm/2.32/master</title>
<subtitle>sourceware.org: git/glibc.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/'/>
<entry>
<title>string: Add a testcase for wcsncmp with SIZE_MAX [BZ #28755]</title>
<updated>2022-02-17T19:32:14+00:00</updated>
<author>
<name>H.J. Lu</name>
<email>hjl.tools@gmail.com</email>
</author>
<published>2022-02-17T16:10:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=0f8a2390000c4e9a152b5f6cf8220f2560c01e74'/>
<id>0f8a2390000c4e9a152b5f6cf8220f2560c01e74</id>
<content type='text'>
Verify that wcsncmp (L("abc"), L("abd"), SIZE_MAX) == 0.  The new test
fails without

commit ddf0992cf57a93200e0c782e2a94d0733a5a0b87
Author: Noah Goldstein &lt;goldstein.w.n@gmail.com&gt;
Date:   Sun Jan 9 16:02:21 2022 -0600

    x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755]

and

commit 7e08db3359c86c94918feb33a1182cd0ff3bb10b
Author: Noah Goldstein &lt;goldstein.w.n@gmail.com&gt;
Date:   Sun Jan 9 16:02:28 2022 -0600

    x86: Fix __wcsncmp_evex in strcmp-evex.S [BZ# 28755]

This is for BZ #28755.

Reviewed-by: Sunil K Pandey &lt;skpgkp2@gmail.com&gt;

(cherry picked from commit aa5a720056d37cf24924c138a3dbe6dace98e97c)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Verify that wcsncmp (L("abc"), L("abd"), SIZE_MAX) == 0.  The new test
fails without

commit ddf0992cf57a93200e0c782e2a94d0733a5a0b87
Author: Noah Goldstein &lt;goldstein.w.n@gmail.com&gt;
Date:   Sun Jan 9 16:02:21 2022 -0600

    x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755]

and

commit 7e08db3359c86c94918feb33a1182cd0ff3bb10b
Author: Noah Goldstein &lt;goldstein.w.n@gmail.com&gt;
Date:   Sun Jan 9 16:02:28 2022 -0600

    x86: Fix __wcsncmp_evex in strcmp-evex.S [BZ# 28755]

This is for BZ #28755.

Reviewed-by: Sunil K Pandey &lt;skpgkp2@gmail.com&gt;

(cherry picked from commit aa5a720056d37cf24924c138a3dbe6dace98e97c)
</pre>
</div>
</content>
</entry>
<entry>
<title>String: Add overflow tests for strnlen, memchr, and strncat [BZ #27974]</title>
<updated>2022-01-27T22:45:39+00:00</updated>
<author>
<name>Noah Goldstein</name>
<email>goldstein.w.n@gmail.com</email>
</author>
<published>2021-06-09T20:17:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=63c84a82a3633560038c2d8863bb07756dc9580d'/>
<id>63c84a82a3633560038c2d8863bb07756dc9580d</id>
<content type='text'>
This commit adds tests for a bug in the wide char variant of the
functions where the implementation may assume that maxlen for wcsnlen
or n for wmemchr/strncat will not overflow when multiplied by
sizeof(wchar_t).

These tests show the following implementations failing on x86_64:

wcsnlen-sse4_1
wcsnlen-avx2

wmemchr-sse2
wmemchr-avx2

strncat would fail as well if it where on a system that prefered
either of the wcsnlen implementations that failed as it relies on
wcsnlen.

Signed-off-by: Noah Goldstein &lt;goldstein.w.n@gmail.com&gt;
Reviewed-by: H.J. Lu &lt;hjl.tools@gmail.com&gt;
(cherry picked from commit da5a6fba0febbfc90896ce1b2eb75c6d8a88a72d)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds tests for a bug in the wide char variant of the
functions where the implementation may assume that maxlen for wcsnlen
or n for wmemchr/strncat will not overflow when multiplied by
sizeof(wchar_t).

These tests show the following implementations failing on x86_64:

wcsnlen-sse4_1
wcsnlen-avx2

wmemchr-sse2
wmemchr-avx2

strncat would fail as well if it where on a system that prefered
either of the wcsnlen implementations that failed as it relies on
wcsnlen.

Signed-off-by: Noah Goldstein &lt;goldstein.w.n@gmail.com&gt;
Reviewed-by: H.J. Lu &lt;hjl.tools@gmail.com&gt;
(cherry picked from commit da5a6fba0febbfc90896ce1b2eb75c6d8a88a72d)
</pre>
</div>
</content>
</entry>
<entry>
<title>test-strnlen.c: Check that strnlen won't go beyond the maximum length</title>
<updated>2022-01-27T22:42:27+00:00</updated>
<author>
<name>H.J. Lu</name>
<email>hjl.tools@gmail.com</email>
</author>
<published>2021-03-27T16:06:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=33046deb9626e35b587db9e722111a450f952e44'/>
<id>33046deb9626e35b587db9e722111a450f952e44</id>
<content type='text'>
Place strings ending at page boundary without the null byte.  If an
implementation goes beyond EXP_LEN, it will trigger the segfault.

(cherry picked from commit cb882b21b63606aabd6e55afe23b42434d95f2ef)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Place strings ending at page boundary without the null byte.  If an
implementation goes beyond EXP_LEN, it will trigger the segfault.

(cherry picked from commit cb882b21b63606aabd6e55afe23b42434d95f2ef)
</pre>
</div>
</content>
</entry>
<entry>
<title>test-strnlen.c: Initialize wchar_t string with wmemset [BZ #27655]</title>
<updated>2022-01-27T22:42:22+00:00</updated>
<author>
<name>H.J. Lu</name>
<email>hjl.tools@gmail.com</email>
</author>
<published>2021-03-27T16:15:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=e218418d4925972ab7979b1712ec15d0cb645b76'/>
<id>e218418d4925972ab7979b1712ec15d0cb645b76</id>
<content type='text'>
Use wmemset to initialize wchar_t string.

(cherry picked from commit 86859b7e58d8670b186c5209ba25f0fbd6612fb7)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use wmemset to initialize wchar_t string.

(cherry picked from commit 86859b7e58d8670b186c5209ba25f0fbd6612fb7)
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove __warn_memset_zero_len [BZ #25399]</title>
<updated>2020-11-10T14:31:01+00:00</updated>
<author>
<name>Siddhesh Poyarekar</name>
<email>siddhesh@sourceware.org</email>
</author>
<published>2020-11-03T09:39:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=5337b2af4b863fc9a1b92134bbe09758f1eff39d'/>
<id>5337b2af4b863fc9a1b92134bbe09758f1eff39d</id>
<content type='text'>
Non-gcc compilers (clang and possibly other compilers that do not
masquerade as gcc 5.0 or later) are unable to use
__warn_memset_zero_len since the symbol is no longer available on
glibc built with gcc 5.0 or later.  While it was likely an oversight
that caused this omission, the fact that it wasn't noticed until
recently (when clang closed the gap on _FORTIFY_SUPPORT) that the
symbol was missing.

Given that both gcc and clang are capable of doing this check in the
compiler, drop all remaining signs of __warn_memset_zero_len from
glibc so that no more objects are built with this symbol in future.

(cherry-picked from dc274b141666766b8ef70992d887e3c0c5e41bed)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Non-gcc compilers (clang and possibly other compilers that do not
masquerade as gcc 5.0 or later) are unable to use
__warn_memset_zero_len since the symbol is no longer available on
glibc built with gcc 5.0 or later.  While it was likely an oversight
that caused this omission, the fact that it wasn't noticed until
recently (when clang closed the gap on _FORTIFY_SUPPORT) that the
symbol was missing.

Given that both gcc and clang are capable of doing this check in the
compiler, drop all remaining signs of __warn_memset_zero_len from
glibc so that no more objects are built with this symbol in future.

(cherry-picked from dc274b141666766b8ef70992d887e3c0c5e41bed)
</pre>
</div>
</content>
</entry>
<entry>
<title>string: Make tst-strerror/tst-strsignal unsupported if msgfmt is not installed</title>
<updated>2020-07-13T12:16:11+00:00</updated>
<author>
<name>Adhemerval Zanella</name>
<email>adhemerval.zanella@linaro.org</email>
</author>
<published>2020-07-09T16:24:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=10b01bd4529336bffc2c398ce43a171ed94aacc7'/>
<id>10b01bd4529336bffc2c398ce43a171ed94aacc7</id>
<content type='text'>
Without msgfmt libc.mo files are not generated and its loading failure
is silent ignored with xsetlocale.

Also unset LANGUAGE environment variable to avoid it taking precedence
when loading the message catalog.  Although not strictly required
(since the test is issued with test-container and it sets a strict
environment variable) it follows other tests that deal with
translation.

Checked on x86_64-linux-gnu.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Without msgfmt libc.mo files are not generated and its loading failure
is silent ignored with xsetlocale.

Also unset LANGUAGE environment variable to avoid it taking precedence
when loading the message catalog.  Although not strictly required
(since the test is issued with test-container and it sets a strict
environment variable) it follows other tests that deal with
translation.

Checked on x86_64-linux-gnu.
</pre>
</div>
</content>
</entry>
<entry>
<title>string: Move tst-strsignal tst-strerror to tests-container</title>
<updated>2020-07-08T13:23:14+00:00</updated>
<author>
<name>Adhemerval Zanella</name>
<email>adhemerval.zanella@linaro.org</email>
</author>
<published>2020-07-08T13:23:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=c1e63c7214aaef99039068da384a0ab3abc176f2'/>
<id>c1e63c7214aaef99039068da384a0ab3abc176f2</id>
<content type='text'>
Both tests require libc.mo translation files which might not be
installed on the system.

Checked on x86_64-linux-gnu.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Both tests require libc.mo translation files which might not be
installed on the system.

Checked on x86_64-linux-gnu.
</pre>
</div>
</content>
</entry>
<entry>
<title>string: Fix prototype mismatch in sigabbrev_np, __sigdescr_np</title>
<updated>2020-07-08T12:19:58+00:00</updated>
<author>
<name>Florian Weimer</name>
<email>fweimer@redhat.com</email>
</author>
<published>2020-07-08T12:19:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=5b2deed8a5d5cca2d82423572415a1c629bea488'/>
<id>5b2deed8a5d5cca2d82423572415a1c629bea488</id>
<content type='text'>
GCC 6 does not ignore the const specifier on the return type.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GCC 6 does not ignore the const specifier on the return type.
</pre>
</div>
</content>
</entry>
<entry>
<title>tst-strsignal: fix checking for RT signals support</title>
<updated>2020-07-07T21:24:50+00:00</updated>
<author>
<name>Samuel Thibault</name>
<email>samuel.thibault@ens-lyon.org</email>
</author>
<published>2020-07-07T21:24:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=5549370a73c45b12621a1abe58920771278a72b4'/>
<id>5549370a73c45b12621a1abe58920771278a72b4</id>
<content type='text'>
* string/tst-strsignal.c (do_test): Actually check that RT signals are
available by comparing SIGRTMAX to SIGRTMIN. Check that SIGRTMAX is 64
before testing for a message reporting 65 for SIGRTMAX+1.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* string/tst-strsignal.c (do_test): Actually check that RT signals are
available by comparing SIGRTMAX to SIGRTMIN. Check that SIGRTMAX is 64
before testing for a message reporting 65 for SIGRTMAX+1.
</pre>
</div>
</content>
</entry>
<entry>
<title>string: Add strerrorname_np and strerrordesc_np</title>
<updated>2020-07-07T18:02:57+00:00</updated>
<author>
<name>Adhemerval Zanella</name>
<email>adhemerval.zanella@linaro.org</email>
</author>
<published>2020-05-18T20:41:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=325081b9eb2035f8f025255206889208f330b590'/>
<id>325081b9eb2035f8f025255206889208f330b590</id>
<content type='text'>
The strerrorname_np returns error number name (e.g. "EINVAL" for EINVAL)
while strerrordesc_np returns string describing error number (e.g
"Invalid argument" for EINVAL).  Different than strerror,
strerrordesc_np does not attempt to translate the return description,
both functions return NULL for an invalid error number.

They should be used instead of sys_errlist and sys_nerr, both are
thread and async-signal safe.  These functions are GNU extensions.

Checked on x86-64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu,
and s390x-linux-gnu.

Tested-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The strerrorname_np returns error number name (e.g. "EINVAL" for EINVAL)
while strerrordesc_np returns string describing error number (e.g
"Invalid argument" for EINVAL).  Different than strerror,
strerrordesc_np does not attempt to translate the return description,
both functions return NULL for an invalid error number.

They should be used instead of sys_errlist and sys_nerr, both are
thread and async-signal safe.  These functions are GNU extensions.

Checked on x86-64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu,
and s390x-linux-gnu.

Tested-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
