<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glibc/include, branch master</title>
<subtitle>Fork of glibc for development</subtitle>
<id>https://git.zx2c4.com/glibc/atom/include?h=master</id>
<link rel='self' href='https://git.zx2c4.com/glibc/atom/include?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/'/>
<updated>2024-07-21T16:23:25Z</updated>
<entry>
<title>Increase version number to 2.40</title>
<updated>2024-07-21T16:23:25Z</updated>
<author>
<name>Andreas K. Hüttel</name>
<email>dilfridge@gentoo.org</email>
</author>
<published>2024-07-21T16:23:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=89d3d815ef6e84935147b683d510bacb0ba4df1d'/>
<id>urn:sha1:89d3d815ef6e84935147b683d510bacb0ba4df1d</id>
<content type='text'>
Signed-off-by: Andreas K. Hüttel &lt;dilfridge@gentoo.org&gt;
</content>
</entry>
<entry>
<title>posix: Sync tempname with gnulib</title>
<updated>2024-04-10T17:53:39Z</updated>
<author>
<name>Adhemerval Zanella</name>
<email>adhemerval.zanella@linaro.org</email>
</author>
<published>2023-10-10T19:22:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=686d5420253bd76b1b7458f91d6ef9fc1a12b229'/>
<id>urn:sha1:686d5420253bd76b1b7458f91d6ef9fc1a12b229</id>
<content type='text'>
The gnulib version contains an important change (9ce573cde), which
fixes some problems with multithreading, entropy loss, and ASLR leak
nfo.  It also fixes an issue where getrandom is not being used
on some new files generation (only for __GT_NOCREATE on first try).

The 044bf893ac removed __path_search, which is now moved to another
gnulib shared files (stdio-common/tmpdir.{c,h}).  Tthis patch
also fixes direxists to use __stat64_time64 instead of __xstat64,
and move the include of pathmax.h for !_LIBC (since it is not used
by glibc).  The license is also changed from GPL 3.0 to 2.1, with
permission from the authors (Bruno Haible and Paul Eggert).

The sync also removed the clock fallback, since clock_gettime
with CLOCK_REALTIME is expected to always succeed.

It syncs with gnulib commit 323834962817af7b115187e8c9a833437f8d20ec.

Checked on x86_64-linux-gnu.

Co-authored-by: Bruno Haible &lt;bruno@clisp.org&gt;
Co-authored-by: Paul Eggert &lt;eggert@cs.ucla.edu&gt;
Reviewed-by: Bruno Haible &lt;bruno@clisp.org&gt;
</content>
</entry>
<entry>
<title>riscv: Enable multi-arg ifunc resolvers</title>
<updated>2024-03-01T15:14:59Z</updated>
<author>
<name>Evan Green</name>
<email>evan@rivosinc.com</email>
</author>
<published>2024-02-27T22:56:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=a29bb320a1a1daa8add4d213fc70f273810dd91a'/>
<id>urn:sha1:a29bb320a1a1daa8add4d213fc70f273810dd91a</id>
<content type='text'>
RISC-V is apparently the first architecture to pass more than one
argument to ifunc resolvers. The helper macros in libc-symbols.h,
__ifunc_resolver(), __ifunc(), and __ifunc_hidden(), are incompatible
with this. These macros have an "arg" (non-final) parameter that
represents the parameter signature of the ifunc resolver. The result is
an inability to pass the required comma through in a single preprocessor
argument.

Rearrange the __ifunc_resolver() macro to be variadic, and pass the
types as those variable parameters. Move the guts of __ifunc() and
__ifunc_hidden() into new macros, __ifunc_args(), and
__ifunc_args_hidden(), that pass the variable arguments down through to
__ifunc_resolver(). Then redefine __ifunc() and __ifunc_hidden(), which
are used in a bunch of places, to simply shuffle the arguments down into
__ifunc_args[_hidden]. Finally, define a riscv-ifunc.h header, which
provides convenience macros to those looking to write ifunc selectors
that use both arguments.

Signed-off-by: Evan Green &lt;evan@rivosinc.com&gt;
Reviewed-by: Florian Weimer &lt;fweimer@redhat.com&gt;
Signed-off-by: Palmer Dabbelt &lt;palmer@rivosinc.com&gt;
</content>
</entry>
<entry>
<title>arm: Use _dl_find_object on __gnu_Unwind_Find_exidx (BZ 31405)</title>
<updated>2024-02-23T11:50:00Z</updated>
<author>
<name>Adhemerval Zanella</name>
<email>adhemerval.zanella@linaro.org</email>
</author>
<published>2024-02-22T13:42:55Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=f4c142bb9fe6b02c0af8cfca8a920091e2dba44b'/>
<id>urn:sha1:f4c142bb9fe6b02c0af8cfca8a920091e2dba44b</id>
<content type='text'>
Instead of __dl_iterate_phdr. On ARM dlfo_eh_frame/dlfo_eh_count
maps to PT_ARM_EXIDX vaddr start / length.

On a Neoverse N1 machine with 160 cores, the following program:

  $ cat test.c
  #include &lt;stdlib.h&gt;
  #include &lt;pthread.h&gt;
  #include &lt;assert.h&gt;

  enum {
    niter = 1024,
    ntimes = 128,
  };

  static void *
  tf (void *arg)
  {
    int a = (int) arg;

    for (int i = 0; i &lt; niter; i++)
      {
        void *p[ntimes];
        for (int j = 0; j &lt; ntimes; j++)
  	p[j] = malloc (a * 128);
        for (int j = 0; j &lt; ntimes; j++)
  	free (p[j]);
      }

    return NULL;
  }

  int main (int argc, char *argv[])
  {
    enum { nthreads = 16 };
    pthread_t t[nthreads];

    for (int i = 0; i &lt; nthreads; i ++)
      assert (pthread_create (&amp;t[i], NULL, tf, (void *) i) == 0);

    for (int i = 0; i &lt; nthreads; i++)
      {
        void *r;
        assert (pthread_join (t[i], &amp;r) == 0);
        assert (r == NULL);
      }

    return 0;
  }
  $ arm-linux-gnueabihf-gcc -fsanitize=address test.c -o test

Improves from ~15s to 0.5s.

Checked on arm-linux-gnueabihf.
</content>
</entry>
<entry>
<title>string: Add hidden builtin definition for __strcpy_chk.</title>
<updated>2024-02-06T08:17:04Z</updated>
<author>
<name>Stefan Liebler</name>
<email>stli@linux.ibm.com</email>
</author>
<published>2024-02-05T13:22:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=fa3eb7d5e7d32ca1ad48b48a7eb6d15b8382c3a7'/>
<id>urn:sha1:fa3eb7d5e7d32ca1ad48b48a7eb6d15b8382c3a7</id>
<content type='text'>
Otherwise on at least x86_64 and s390x there is an unwanted PLT entry
in libc.so when configured with --enable-fortify-source=3 and build
with -Os.

This is observed in elf/check-localplt
Extra PLT reference: libc.so: __strcpy_chk

The call to PLT entry is in inet/ruserpass.c.
Reviewed-by: Adhemerval Zanella  &lt;adhemerval.zanella@linaro.org&gt;
</content>
</entry>
<entry>
<title>Refer to C23 in place of C2X in glibc</title>
<updated>2024-02-01T11:02:01Z</updated>
<author>
<name>Joseph Myers</name>
<email>josmyers@redhat.com</email>
</author>
<published>2024-02-01T11:02:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=42cc619dfbc44e263239c2de870bae11ad65810a'/>
<id>urn:sha1:42cc619dfbc44e263239c2de870bae11ad65810a</id>
<content type='text'>
WG14 decided to use the name C23 as the informal name of the next
revision of the C standard (notwithstanding the publication date in
2024).  Update references to C2X in glibc to use the C23 name.

This is intended to update everything *except* where it involves
renaming files (the changes involving renaming tests are intended to
be done separately).  In the case of the _ISOC2X_SOURCE feature test
macro - the only user-visible interface involved - support for that
macro is kept for backwards compatibility, while adding
_ISOC23_SOURCE.

Tested for x86_64.
</content>
</entry>
<entry>
<title>version.h, include/features.h: Bump version to 2.39</title>
<updated>2024-01-31T00:29:11Z</updated>
<author>
<name>Andreas K. Hüttel</name>
<email>dilfridge@gentoo.org</email>
</author>
<published>2024-01-31T00:29:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=3e941ef87e5ac15a59ec32dd1750a58904ad2fb0'/>
<id>urn:sha1:3e941ef87e5ac15a59ec32dd1750a58904ad2fb0</id>
<content type='text'>
Signed-off-by: Andreas K. Hüttel &lt;dilfridge@gentoo.org&gt;
</content>
</entry>
<entry>
<title>Implement C23 &lt;stdbit.h&gt;</title>
<updated>2024-01-03T12:07:14Z</updated>
<author>
<name>Joseph Myers</name>
<email>jsm@polyomino.org.uk</email>
</author>
<published>2024-01-03T12:07:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=b34b46b8806a115b86da3b2b22555ad5bffa89d1'/>
<id>urn:sha1:b34b46b8806a115b86da3b2b22555ad5bffa89d1</id>
<content type='text'>
C23 adds a header &lt;stdbit.h&gt; with various functions and type-generic
macros for bit-manipulation of unsigned integers (plus macro defines
related to endianness).  Implement this header for glibc.

The functions have both inline definitions in the header (referenced
by macros defined in the header) and copies with external linkage in
the library (which are implemented in terms of those macros to avoid
duplication).  They are documented in the glibc manual.  Tests, as
well as verifying results for various inputs (of both the macros and
the out-of-line functions), verify the types of those results (which
showed up a bug in an earlier version with the type-generic macro
stdc_has_single_bit wrongly returning a promoted type), that the
macros can be used at top level in a source file (so don't use ({})),
that they evaluate their arguments exactly once, and that the macros
for the type-specific functions have the expected implicit conversions
to the relevant argument type.

Jakub previously referred to -Wconversion warnings in type-generic
macros, so I've included a test with -Wconversion (but the only
warnings I saw and fixed from that test were actually in inline
functions in the &lt;stdbit.h&gt; header - not anything coming from use of
the type-generic macros themselves).

This implementation of the type-generic macros does not handle
unsigned __int128, or unsigned _BitInt types with a width other than
that of a standard integer type (and C23 doesn't require the header to
handle such types either).  Support for those types, using the new
type-generic built-in functions Jakub's added for GCC 14, can
reasonably be added in a followup (along of course with associated
tests).

This implementation doesn't do anything special to handle C++, or have
any tests of functionality in C++ beyond the existing tests that all
headers can be compiled in C++ code; it's not clear exactly what form
this header should take in C++, but probably not one using macros.

DIS ballot comment AT-107 asks for the word "count" to be added to the
names of the stdc_leading_zeros, stdc_leading_ones,
stdc_trailing_zeros and stdc_trailing_ones functions and macros.  I
don't think it's likely to be accepted (accepting any technical
comments would mean having an FDIS ballot), but if it is accepted at
the WG14 meeting (22-26 January in Strasbourg, starting with DIS
ballot comment handling) then there would still be time to update
glibc for the renaming before the 2.39 release.

The new functions and header are placed in the stdlib/ directory in
glibc, rather than creating a new toplevel stdbit/ or putting them in
string/ alongside ffs.

Tested for x86_64 and x86.
</content>
</entry>
<entry>
<title>Update copyright dates with scripts/update-copyrights</title>
<updated>2024-01-01T18:53:40Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2024-01-01T18:12:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=dff8da6b3e89b986bb7f6b1ec18cf65d5972e307'/>
<id>urn:sha1:dff8da6b3e89b986bb7f6b1ec18cf65d5972e307</id>
<content type='text'>
</content>
</entry>
<entry>
<title>aarch64: Add half-width versions of AdvSIMD f32 libmvec routines</title>
<updated>2023-12-20T08:41:25Z</updated>
<author>
<name>Joe Ramsay</name>
<email>Joe.Ramsay@arm.com</email>
</author>
<published>2023-12-19T16:44:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=cc0d77ba944cd4ce46c5f0e6d426af3057962ca5'/>
<id>urn:sha1:cc0d77ba944cd4ce46c5f0e6d426af3057962ca5</id>
<content type='text'>
Compilers may emit calls to 'half-width' routines (two-lane
single-precision variants). These have been added in the form of
wrappers around the full-width versions, where the low half of the
vector is simply duplicated. This will perform poorly when one lane
triggers the special-case handler, as there will be a redundant call
to the scalar version, however this is expected to be rare at Ofast.

Reviewed-by: Szabolcs Nagy &lt;szabolcs.nagy@arm.com&gt;
</content>
</entry>
</feed>
