<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glibc.git/stdlib, branch release/2.28/master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/glibc.git/'/>
<entry>
<title>testsuite: stdlib/isomac.c: add missing include</title>
<updated>2024-05-10T02:11:00+00:00</updated>
<author>
<name>Aurelien Jarno</name>
<email>aurelien@aurel32.net</email>
</author>
<published>2019-01-08T20:10:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/glibc.git/commit/?id=c0a523f13b0868d03046a7e479fe5fb7039bd397'/>
<id>c0a523f13b0868d03046a7e479fe5fb7039bd397</id>
<content type='text'>
When running the testsuite, building stdlib/isomac.c outputs the
following warning:

  gcc -O   -D_GNU_SOURCE -DIS_IN_build -include /home/aurel32/glibc-build/config.h isomac.c -o /home/aurel32/glibc-build/stdlib/isomac
  isomac.c: In function ‘get_null_defines’:
  isomac.c:260:3: warning: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Wimplicit-function-declaration]
     close (fd);
     ^~~~~
     pclose

Fix that by adding the &lt;unistd.h&gt; include.

Changelog:
	* stdlib/isomac.c: Include &lt;unistd.h&gt;.
(cherry picked from commit 11f382ee780649549428cb25af3a9f1d3465868d)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When running the testsuite, building stdlib/isomac.c outputs the
following warning:

  gcc -O   -D_GNU_SOURCE -DIS_IN_build -include /home/aurel32/glibc-build/config.h isomac.c -o /home/aurel32/glibc-build/stdlib/isomac
  isomac.c: In function ‘get_null_defines’:
  isomac.c:260:3: warning: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Wimplicit-function-declaration]
     close (fd);
     ^~~~~
     pclose

Fix that by adding the &lt;unistd.h&gt; include.

Changelog:
	* stdlib/isomac.c: Include &lt;unistd.h&gt;.
(cherry picked from commit 11f382ee780649549428cb25af3a9f1d3465868d)
</pre>
</div>
</content>
</entry>
<entry>
<title>support: Add capability to fork an sgid child</title>
<updated>2021-04-14T05:51:49+00:00</updated>
<author>
<name>Siddhesh Poyarekar</name>
<email>siddhesh@sourceware.org</email>
</author>
<published>2021-04-09T15:25:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/glibc.git/commit/?id=b790d1c116b3a2fbf3cec2fa96ba7638fa3caee3'/>
<id>b790d1c116b3a2fbf3cec2fa96ba7638fa3caee3</id>
<content type='text'>
Add a new function support_capture_subprogram_self_sgid that spawns an
sgid child of the running program with its own image and returns the
exit code of the child process.  This functionality is used by at
least three tests in the testsuite at the moment, so it makes sense to
consolidate.

There is also a new function support_subprogram_wait which should
provide simple system() like functionality that does not set up file
actions.  This is useful in cases where only the return code of the
spawned subprocess is interesting.

This patch also ports tst-secure-getenv to this new function.  A
subsequent patch will port other tests.  This also brings an important
change to tst-secure-getenv behaviour.  Now instead of succeeding, the
test fails as UNSUPPORTED if it is unable to spawn a setgid child,
which is how it should have been in the first place.
Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;

(cherry picked from commit 716a3bdc41b2b4b864dc64475015ba51e35e1273)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new function support_capture_subprogram_self_sgid that spawns an
sgid child of the running program with its own image and returns the
exit code of the child process.  This functionality is used by at
least three tests in the testsuite at the moment, so it makes sense to
consolidate.

There is also a new function support_subprogram_wait which should
provide simple system() like functionality that does not set up file
actions.  This is useful in cases where only the return code of the
spawned subprocess is interesting.

This patch also ports tst-secure-getenv to this new function.  A
subsequent patch will port other tests.  This also brings an important
change to tst-secure-getenv behaviour.  Now instead of succeeding, the
test fails as UNSUPPORTED if it is unable to spawn a setgid child,
which is how it should have been in the first place.
Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;

(cherry picked from commit 716a3bdc41b2b4b864dc64475015ba51e35e1273)
</pre>
</div>
</content>
</entry>
<entry>
<title>stdlib/tst-strtod-overflow: Switch to support_blob_repeat</title>
<updated>2018-11-02T09:47:16+00:00</updated>
<author>
<name>Florian Weimer</name>
<email>fweimer@redhat.com</email>
</author>
<published>2018-10-30T12:55:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/glibc.git/commit/?id=e1af1df694603c0dcd5118c30eea2cdeb01a1a0b'/>
<id>e1af1df694603c0dcd5118c30eea2cdeb01a1a0b</id>
<content type='text'>
This is another test with an avoidable large memory allocation.

(cherry picked from commit 07da99aad93c9364acb7efdab47c27ba698f6313)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is another test with an avoidable large memory allocation.

(cherry picked from commit 07da99aad93c9364acb7efdab47c27ba698f6313)
</pre>
</div>
</content>
</entry>
<entry>
<title>stdlib/test-bz22786: Avoid memory leaks in the test itself</title>
<updated>2018-11-02T09:47:16+00:00</updated>
<author>
<name>Florian Weimer</name>
<email>fweimer@redhat.com</email>
</author>
<published>2018-10-30T12:56:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/glibc.git/commit/?id=69dcd992a0efdb53bc2ea4948cfc6b13416b9636'/>
<id>69dcd992a0efdb53bc2ea4948cfc6b13416b9636</id>
<content type='text'>
(cherry picked from commit 60708030536df82616c16aa2f14f533c4362b969)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 60708030536df82616c16aa2f14f533c4362b969)
</pre>
</div>
</content>
</entry>
<entry>
<title>stdlib/test-bz22786: Avoid spurious test failures using alias mappings</title>
<updated>2018-11-02T09:47:16+00:00</updated>
<author>
<name>Florian Weimer</name>
<email>fweimer@redhat.com</email>
</author>
<published>2018-10-30T12:11:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/glibc.git/commit/?id=dcd52b94bf50f337dc4cfffa24ed86d7dfe03dc0'/>
<id>dcd52b94bf50f337dc4cfffa24ed86d7dfe03dc0</id>
<content type='text'>
On systems without enough random-access memory, stdlib/test-bz22786
will go deeply into swap and time out, even with a substantial
TIMEOUTFACTOR.  This commit adds a facility to construct repeating
strings with alias mappings, so that the requirement for physical
memory, and uses it in stdlib/test-bz22786.

(cherry picked from commit f5e7e95921847bd83186bfe621fc2b48c4de5477)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On systems without enough random-access memory, stdlib/test-bz22786
will go deeply into swap and time out, even with a substantial
TIMEOUTFACTOR.  This commit adds a facility to construct repeating
strings with alias mappings, so that the requirement for physical
memory, and uses it in stdlib/test-bz22786.

(cherry picked from commit f5e7e95921847bd83186bfe621fc2b48c4de5477)
</pre>
</div>
</content>
</entry>
<entry>
<title>Test stdlib/test-bz22786 exits now with unsupported if malloc fails.</title>
<updated>2018-11-02T09:47:16+00:00</updated>
<author>
<name>Stefan Liebler</name>
<email>stli@linux.ibm.com</email>
</author>
<published>2018-08-30T06:44:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/glibc.git/commit/?id=d0b6db4acfba1f48b24da2c9b2a1530f6dd71503'/>
<id>d0b6db4acfba1f48b24da2c9b2a1530f6dd71503</id>
<content type='text'>
The test tries to allocate more than 2^31 bytes which will always fail on s390
as it has maximum 2^31bit of memory.
Before commit 6c3a8a9d868a8deddf0d6dcc785b6d120de90523, this test returned
unsupported if malloc fails.  This patch re enables this behaviour.

Furthermore support_delete_temp_files() failed to remove the temp directory
in this case as it is not empty due to the created symlink.
Thus the creation of the symlink is moved behind malloc.

Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;

ChangeLog:

	* stdlib/test-bz22786.c (do_test): Return EXIT_UNSUPPORTED
	if malloc fails.

(cherry picked from commit 3bad2358d67d371497079bba4f8eca9c0096f4e2)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The test tries to allocate more than 2^31 bytes which will always fail on s390
as it has maximum 2^31bit of memory.
Before commit 6c3a8a9d868a8deddf0d6dcc785b6d120de90523, this test returned
unsupported if malloc fails.  This patch re enables this behaviour.

Furthermore support_delete_temp_files() failed to remove the temp directory
in this case as it is not empty due to the created symlink.
Thus the creation of the symlink is moved behind malloc.

Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;

ChangeLog:

	* stdlib/test-bz22786.c (do_test): Return EXIT_UNSUPPORTED
	if malloc fails.

(cherry picked from commit 3bad2358d67d371497079bba4f8eca9c0096f4e2)
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix BZ#23400 (creating temporary files in source tree), and undefined behavior in test.</title>
<updated>2018-11-02T09:47:07+00:00</updated>
<author>
<name>Paul Pluzhnikov</name>
<email>ppluzhnikov@kazbek.mtv.corp.google.com</email>
</author>
<published>2018-11-02T09:47:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/glibc.git/commit/?id=df11de91931597ab4adccb74d9d55c9ddd029a22'/>
<id>df11de91931597ab4adccb74d9d55c9ddd029a22</id>
<content type='text'>
(cherry picked from commit 6c3a8a9d868a8deddf0d6dcc785b6d120de90523)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 6c3a8a9d868a8deddf0d6dcc785b6d120de90523)
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix stack overflow in tst-setcontext9 (bug 23717)</title>
<updated>2018-09-27T10:37:06+00:00</updated>
<author>
<name>Andreas Schwab</name>
<email>schwab@suse.de</email>
</author>
<published>2018-09-27T10:37:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/glibc.git/commit/?id=3a67c72c1512f778304a5644dea2fcf5bdece274'/>
<id>3a67c72c1512f778304a5644dea2fcf5bdece274</id>
<content type='text'>
The function f1a, executed on a stack of size 32k, allocates an object of
size 32k on the stack.  Make the stack variables static to reduce
excessive stack usage.

(cherry picked from commit f841c97e515a1673485a2b12b3c280073d737890)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function f1a, executed on a stack of size 32k, allocates an object of
size 32k on the stack.  Make the stack variables static to reduce
excessive stack usage.

(cherry picked from commit f841c97e515a1673485a2b12b3c280073d737890)
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix tst-setcontext9 for optimized small stacks.</title>
<updated>2018-09-20T15:03:28+00:00</updated>
<author>
<name>Carlos O'Donell</name>
<email>carlos@redhat.com</email>
</author>
<published>2018-09-05T05:16:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/glibc.git/commit/?id=a55e109709af55e6ed67d3f9536cac5d929c982e'/>
<id>a55e109709af55e6ed67d3f9536cac5d929c982e</id>
<content type='text'>
If the compiler reduces the stack usage in function f1 before calling
into function f2, then when we swapcontext back to f1 and continue
execution we may overwrite registers that were spilled to the stack
while f2 was executing.  Later when we return to f2 the corrupt
registers will be reloaded from the stack and the test will crash.  This
was most commonly observed on i686 with __x86.get_pc_thunk.dx and
needing to save and restore $edx.  Overall i686 has few registers and
the spilling to the stack is bound to happen, therefore the solution to
making this test robust is to split function f1 into two parts f1a and
f1b, and allocate f1b it's own stack such that subsequent execution does
not overwrite the stack in use by function f2.

Tested on i686 and x86_64.

Signed-off-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
(cherry picked from commit 791b350dc725545e3f9b5db0f97ebdbc60c9735f)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the compiler reduces the stack usage in function f1 before calling
into function f2, then when we swapcontext back to f1 and continue
execution we may overwrite registers that were spilled to the stack
while f2 was executing.  Later when we return to f2 the corrupt
registers will be reloaded from the stack and the test will crash.  This
was most commonly observed on i686 with __x86.get_pc_thunk.dx and
needing to save and restore $edx.  Overall i686 has few registers and
the spilling to the stack is bound to happen, therefore the solution to
making this test robust is to split function f1 into two parts f1a and
f1b, and allocate f1b it's own stack such that subsequent execution does
not overwrite the stack in use by function f2.

Tested on i686 and x86_64.

Signed-off-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
(cherry picked from commit 791b350dc725545e3f9b5db0f97ebdbc60c9735f)
</pre>
</div>
</content>
</entry>
<entry>
<title>Add tests for setcontext on the context from makecontext</title>
<updated>2018-07-25T12:13:16+00:00</updated>
<author>
<name>H.J. Lu</name>
<email>hjl.tools@gmail.com</email>
</author>
<published>2018-07-25T12:12:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/glibc.git/commit/?id=375a484459efcf2da1100e9ed228863be6665986'/>
<id>375a484459efcf2da1100e9ed228863be6665986</id>
<content type='text'>
Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;

	* stdlib/Makefile ((tests): Add tst-setcontext6, tst-setcontext7,
	tst-setcontext8 and tst-setcontext9.
	* stdlib/tst-setcontext6.c: New file.
	* stdlib/tst-setcontext7.c: Likewise.
	* stdlib/tst-setcontext8.c: Likewise.
	* stdlib/tst-setcontext9.c: Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;

	* stdlib/Makefile ((tests): Add tst-setcontext6, tst-setcontext7,
	tst-setcontext8 and tst-setcontext9.
	* stdlib/tst-setcontext6.c: New file.
	* stdlib/tst-setcontext7.c: Likewise.
	* stdlib/tst-setcontext8.c: Likewise.
	* stdlib/tst-setcontext9.c: Likewise.
</pre>
</div>
</content>
</entry>
</feed>
