<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glibc/libio, branch master</title>
<subtitle>Fork of glibc for development</subtitle>
<id>https://git.zx2c4.com/glibc/atom/libio?h=master</id>
<link rel='self' href='https://git.zx2c4.com/glibc/atom/libio?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/'/>
<updated>2024-07-09T08:12:36Z</updated>
<entry>
<title>libio: handle opening a file when all files are closed (bug 31963)</title>
<updated>2024-07-09T08:12:36Z</updated>
<author>
<name>Andreas Schwab</name>
<email>schwab@suse.de</email>
</author>
<published>2024-07-08T13:52:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=2213b37b705843908355a89648017f4e597b2bbb'/>
<id>urn:sha1:2213b37b705843908355a89648017f4e597b2bbb</id>
<content type='text'>
_IO_list_all becomes NULL when all files (including standard files) are
closed.
</content>
</entry>
<entry>
<title>Fix conditionals on mtrace-based tests (bug 31892)</title>
<updated>2024-07-01T15:20:30Z</updated>
<author>
<name>Carlos O'Donell</name>
<email>carlos@redhat.com</email>
</author>
<published>2024-06-19T15:48:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=a7fe3e805d2ee128ac5f43b2a24201726d41cc04'/>
<id>urn:sha1:a7fe3e805d2ee128ac5f43b2a24201726d41cc04</id>
<content type='text'>
The conditionals for several mtrace-based tests in catgets, elf, libio,
malloc, misc, nptl, posix, and stdio-common were incorrect leading to
test failures when bootstrapping glibc without perl.

The correct conditional for mtrace-based tests requires three checks:
first checking for run-built-tests, then build-shared, and lastly that
PERL is not equal to "no" (missing perl).
Reviewed-by: Adhemerval Zanella  &lt;adhemerval.zanella@linaro.org&gt;
</content>
</entry>
<entry>
<title>&lt;stdio.h&gt;: Acknowledge that getdelim/getline are in POSIX</title>
<updated>2024-06-11T21:17:12Z</updated>
<author>
<name>Philip Kaludercic</name>
<email>philipk@posteo.net</email>
</author>
<published>2024-06-09T11:14:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=e7ac92e6ca9784b397189df0b2e1fb34f425bab8'/>
<id>urn:sha1:e7ac92e6ca9784b397189df0b2e1fb34f425bab8</id>
<content type='text'>
These comments were written in 2003 (added in 2c008571c3a), predating
the addition of getdelim(3)/getline(3) in POSIX.1-2008.

Reviewed-by: Sam James &lt;sam@gentoo.org&gt;
Reviewed-by: Florian Weimer &lt;fweimer@redhat.com&gt;
</content>
</entry>
<entry>
<title>libio: Test for fdopen memory leak without SEEK_END support (bug 31840)</title>
<updated>2024-06-04T14:09:33Z</updated>
<author>
<name>Florian Weimer</name>
<email>fweimer@redhat.com</email>
</author>
<published>2024-06-04T12:37:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=d0106b6ae26c8cc046269358a77188105c99d5e3'/>
<id>urn:sha1:d0106b6ae26c8cc046269358a77188105c99d5e3</id>
<content type='text'>
The bug report used /dev/mem, but /proc/self/mem works as well
(if available).
</content>
</entry>
<entry>
<title>Remove memory leak in fdopen (bug 31840)</title>
<updated>2024-06-04T12:42:06Z</updated>
<author>
<name>Andreas Schwab</name>
<email>schwab@suse.de</email>
</author>
<published>2024-06-04T09:01:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=b2c3ee3724900975deaf5eae57640bb0c2d7315e'/>
<id>urn:sha1:b2c3ee3724900975deaf5eae57640bb0c2d7315e</id>
<content type='text'>
Deallocate the memory for the FILE structure when seeking to the end fails
in append mode.

Fixes: ea33158c96 ("Fix offset caching for streams and use it for ftell (BZ #16680)")
</content>
</entry>
<entry>
<title>Change _IO_stderr_/_IO_stdin_/_IO_stdout to compat symbols [BZ #31766]</title>
<updated>2024-05-21T17:12:25Z</updated>
<author>
<name>H.J. Lu</name>
<email>hjl.tools@gmail.com</email>
</author>
<published>2024-05-21T02:30:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=85472c20a55ea2a49a7fbdf71652b4009118b0ae'/>
<id>urn:sha1:85472c20a55ea2a49a7fbdf71652b4009118b0ae</id>
<content type='text'>
Since Glibc never provides symbol binary compatibility for relocatable
files, fix BZ #31766 by changing _IO_stderr_/_IO_stdin_/_IO_stdout to
compat symbols.

Signed-off-by: H.J. Lu &lt;hjl.tools@gmail.com&gt;
Reviewed-by: Sunil K Pandey &lt;skpgkp2@gmail.com&gt;
</content>
</entry>
<entry>
<title>Use a doubly-linked list for _IO_list_all (bug 27777)</title>
<updated>2024-05-17T21:13:25Z</updated>
<author>
<name>Alexandre Ferrieux</name>
<email>alexandre.ferrieux@orange.com</email>
</author>
<published>2024-05-16T12:54:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=2a99e2398d9d717c034e915f7846a49e623f5450'/>
<id>urn:sha1:2a99e2398d9d717c034e915f7846a49e623f5450</id>
<content type='text'>
This patch fixes BZ #27777 "fclose does a linear search, takes ages when
many FILE* are opened".  Simply put, the master list of opened (FILE*),
namely _IO_list_all, is a singly-linked list.  As a consequence, the
removal of a single element is in O(N), which cripples the performance
of fclose().  The patch switches to a doubly-linked list, yielding O(1)
removal.  The one padding field in struct _IO_FILE, __pad5, is renamed
to _prevchain for a doubly-linked list.  Since fields in struct _IO_FILE
after the _lock field are internal to glibc and opaque to applications.
We can change them as long as the size of struct _IO_FILE is unchanged,
which is checked as the part of glibc ABI with sizes of _IO_2_1_stdin_,
_IO_2_1_stdout_ and _IO_2_1_stderr_.

NB: When _IO_vtable_offset (fp) == 0, copy relocation will cover the
whole struct _IO_FILE.  Otherwise, only fields up to the _lock field
will be copied to applications at run-time.  It is used to check if
the _prevchain field can be safely accessed.

After opening 2 million (FILE*), the fclose() of 100 of them takes quite
a few seconds without the patch, and under 2 seconds with it on a loaded
machine.

No test is added since there are no functional changes.

Co-Authored-By: H.J. Lu &lt;hjl.tools@gmail.com&gt;
Signed-off-by: Alexandre Ferrieux &lt;alexandre.ferrieux@orange.com&gt;
Signed-off-by: H.J. Lu &lt;hjl.tools@gmail.com&gt;
Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</content>
</entry>
<entry>
<title>libio/bug-wsetpos: Make the error message match the causing function</title>
<updated>2024-05-13T11:50:48Z</updated>
<author>
<name>Maciej W. Rozycki</name>
<email>macro@redhat.com</email>
</author>
<published>2024-05-13T11:50:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=e3c375eb4f33e265b0cb186435c0b540ed27d2da'/>
<id>urn:sha1:e3c375eb4f33e265b0cb186435c0b540ed27d2da</id>
<content type='text'>
This test case calls `fopen':

  FILE *fp = fopen (temp_file, "r");

however if that fails it reports `fdopen' being the origin of the error.
Adjust the message to say `fopen' then.
</content>
</entry>
<entry>
<title>Add crt1-2.0.o for glibc 2.0 compatibility tests</title>
<updated>2024-05-06T14:49:40Z</updated>
<author>
<name>H.J. Lu</name>
<email>hjl.tools@gmail.com</email>
</author>
<published>2024-04-30T16:57:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=5f245f3bfbe61b2182964dafb94907e38284b806'/>
<id>urn:sha1:5f245f3bfbe61b2182964dafb94907e38284b806</id>
<content type='text'>
Starting from glibc 2.1, crt1.o contains _IO_stdin_used which is checked
by _IO_check_libio to provide binary compatibility for glibc 2.0.  Add
crt1-2.0.o for tests against glibc 2.0.  Define tests-2.0 for glibc 2.0
compatibility tests.  Add and update glibc 2.0 compatibility tests for
stderr, matherr and pthread_kill.
Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</content>
</entry>
<entry>
<title>libio: Sort test variables in Makefile</title>
<updated>2024-04-30T16:43:20Z</updated>
<author>
<name>H.J. Lu</name>
<email>hjl.tools@gmail.com</email>
</author>
<published>2024-04-30T16:21:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=ddf71c550a5940deca74cc676f1cae134a891717'/>
<id>urn:sha1:ddf71c550a5940deca74cc676f1cae134a891717</id>
<content type='text'>
Sort test variables in libio/Makefile using scripts/sort-makefile-lines.py.
Reviewed-by: Sunil K Pandey &lt;skpgkp2@gmail.com&gt;
</content>
</entry>
</feed>
