<feed xmlns='http://www.w3.org/2005/Atom'>
<title>uClibc-alpine/libc/stdlib, branch master</title>
<subtitle>Where we track our uclibc patches
</subtitle>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/uClibc-alpine/'/>
<entry>
<title>libc: fix signal handling in system()</title>
<updated>2012-01-24T02:22:06+00:00</updated>
<author>
<name>Richard Braun</name>
<email>rbraun@sceen.net</email>
</author>
<published>2012-01-17T09:33:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/uClibc-alpine/commit/?id=eb72efd81e0d5be6c836c5a084cc65b9734f544d'/>
<id>eb72efd81e0d5be6c836c5a084cc65b9734f544d</id>
<content type='text'>
When built without NPTL support (or for a sparc target), the system()
function doesn't conform to its specification. Namely, it uses signal()
to install/save/restore signal handlers, which may break applications
using custom handlers installed with sigaction(). In addition, it resets
the SIGCHLD handler to SIG_DFL instead of blocking the signal, which may
result in "lost" signals if a custom handler was installed.

Fix system() by replacing uses of signal() with appropriate calls to
sigaction() and sigprocmask().

Signed-off-by: Richard Braun &lt;rbraun@sceen.net&gt;
Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When built without NPTL support (or for a sparc target), the system()
function doesn't conform to its specification. Namely, it uses signal()
to install/save/restore signal handlers, which may break applications
using custom handlers installed with sigaction(). In addition, it resets
the SIGCHLD handler to SIG_DFL instead of blocking the signal, which may
result in "lost" signals if a custom handler was installed.

Fix system() by replacing uses of signal() with appropriate calls to
sigaction() and sigprocmask().

Signed-off-by: Richard Braun &lt;rbraun@sceen.net&gt;
Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libc: build abort with unwind-info for backtrace</title>
<updated>2012-01-15T11:27:41+00:00</updated>
<author>
<name>Bernhard Reutner-Fischer</name>
<email>rep.dot.nop@gmail.com</email>
</author>
<published>2012-01-15T11:27:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/uClibc-alpine/commit/?id=4db2caac1ccfade5fcde67c9800d7f3512220137'/>
<id>4db2caac1ccfade5fcde67c9800d7f3512220137</id>
<content type='text'>
If backtrace support is turned on, build raise() and abort() with
unwind info (fixup 4c9b7f3c21ff21c199e54bfad2fdf3445fa4573d).

Signed-off-by: Bernhard Reutner-Fischer &lt;rep.dot.nop@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If backtrace support is turned on, build raise() and abort() with
unwind info (fixup 4c9b7f3c21ff21c199e54bfad2fdf3445fa4573d).

Signed-off-by: Bernhard Reutner-Fischer &lt;rep.dot.nop@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libc: allow to backtrace out of abort call</title>
<updated>2012-01-13T11:22:59+00:00</updated>
<author>
<name>Carmelo Amoroso</name>
<email>carmelo.amoroso@st.com</email>
</author>
<published>2012-01-03T18:09:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/uClibc-alpine/commit/?id=4c9b7f3c21ff21c199e54bfad2fdf3445fa4573d'/>
<id>4c9b7f3c21ff21c199e54bfad2fdf3445fa4573d</id>
<content type='text'>
Build raise and abort function with dwarf2 info by using
-fasynchronous-unwind-tables to make backtrace() working across a
call to abort.

A scenario where it could be useful is within a signal handler that
wants to dump a backtrace when catching some signal (i.e SIGABRT).
Without having abort &amp; raise built with DWARF2 information, it is not
possible for the libgcc stack unwinder to walk through the call stack
out of the abort/raise function.

Impacts in terms of size are really limited

Current
   text    data     bss     dec     hex filename
    164       0       0     164      a4 ./libpthread/nptl/sysdeps/unix/sysv/linux/raise.os
    164       0       0     164      a4 ./libpthread/nptl/sysdeps/unix/sysv/linux/raise.oS
    220      24       4     248      f8 ./libc/stdlib/abort.os

With (-fasynchronous-unwind-tables)

   text    data     bss     dec     hex filename
    216       0       0     216      d8 ./libpthread/nptl/sysdeps/unix/sysv/linux/raise.os
    216       0       0     216      d8 ./libpthread/nptl/sysdeps/unix/sysv/linux/raise.oS
    280      24       4     308     134 ./libc/stdlib/abort.os

Signed-off-by: Carmelo Amoroso &lt;carmelo.amoroso@st.com&gt;
Acked-by: Bernhard Reutner-Fischer &lt;rep.dot.nop@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Build raise and abort function with dwarf2 info by using
-fasynchronous-unwind-tables to make backtrace() working across a
call to abort.

A scenario where it could be useful is within a signal handler that
wants to dump a backtrace when catching some signal (i.e SIGABRT).
Without having abort &amp; raise built with DWARF2 information, it is not
possible for the libgcc stack unwinder to walk through the call stack
out of the abort/raise function.

Impacts in terms of size are really limited

Current
   text    data     bss     dec     hex filename
    164       0       0     164      a4 ./libpthread/nptl/sysdeps/unix/sysv/linux/raise.os
    164       0       0     164      a4 ./libpthread/nptl/sysdeps/unix/sysv/linux/raise.oS
    220      24       4     248      f8 ./libc/stdlib/abort.os

With (-fasynchronous-unwind-tables)

   text    data     bss     dec     hex filename
    216       0       0     216      d8 ./libpthread/nptl/sysdeps/unix/sysv/linux/raise.os
    216       0       0     216      d8 ./libpthread/nptl/sysdeps/unix/sysv/linux/raise.oS
    280      24       4     308     134 ./libc/stdlib/abort.os

Signed-off-by: Carmelo Amoroso &lt;carmelo.amoroso@st.com&gt;
Acked-by: Bernhard Reutner-Fischer &lt;rep.dot.nop@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>stdlib: add qsort_r</title>
<updated>2011-11-07T08:24:30+00:00</updated>
<author>
<name>Bernhard Reutner-Fischer</name>
<email>rep.dot.nop@gmail.com</email>
</author>
<published>2011-11-07T08:24:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/uClibc-alpine/commit/?id=515d54433138596e81267237542bd9168b8cc787'/>
<id>515d54433138596e81267237542bd9168b8cc787</id>
<content type='text'>
GNU extension like qsort but takes a 3 parameter comparision function.

Signed-off-by: Bernhard Reutner-Fischer &lt;rep.dot.nop@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GNU extension like qsort but takes a 3 parameter comparision function.

Signed-off-by: Bernhard Reutner-Fischer &lt;rep.dot.nop@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Defeat compiler optimization which assumes function addresses are never NULL</title>
<updated>2011-09-15T14:59:21+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>dvlasenk@redhat.com</email>
</author>
<published>2011-09-15T14:59:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/uClibc-alpine/commit/?id=82f8d0bce10403deab704871e638edc24e7933ee'/>
<id>82f8d0bce10403deab704871e638edc24e7933ee</id>
<content type='text'>
From email:
A warning for people who can be hit by the same or similar issue:
gcc 4.1.2 with -march=i486 here with -Os and even with -O2 or -O
is "optimizing away" the check
       if (_stdio_term)
in libc/stdlib/_atexit.c
which results in a "call 0" and a segfault at exit
if you do not happen to link in stdio.

Signed-off-by: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
From email:
A warning for people who can be hit by the same or similar issue:
gcc 4.1.2 with -march=i486 here with -Os and even with -O2 or -O
is "optimizing away" the check
       if (_stdio_term)
in libc/stdlib/_atexit.c
which results in a "call 0" and a segfault at exit
if you do not happen to link in stdio.

Signed-off-by: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>__uc_malloc: Fix memory-leak in error path</title>
<updated>2011-05-10T18:09:36+00:00</updated>
<author>
<name>Bernhard Reutner-Fischer</name>
<email>rep.dot.nop@gmail.com</email>
</author>
<published>2011-05-10T18:09:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/uClibc-alpine/commit/?id=025ec197fe9d069c6d705e6f7d1509bb9dc1ce56'/>
<id>025ec197fe9d069c6d705e6f7d1509bb9dc1ce56</id>
<content type='text'>
Signed-off-by: Bernhard Reutner-Fischer &lt;rep.dot.nop@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Bernhard Reutner-Fischer &lt;rep.dot.nop@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix malloc alignment</title>
<updated>2011-04-11T11:26:56+00:00</updated>
<author>
<name>Bernd Schmidt</name>
<email>bernds@codesourcery.com</email>
</author>
<published>2011-04-11T11:19:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/uClibc-alpine/commit/?id=eff2d0ba5890b517ef5bc9d0269d6149556c12c8'/>
<id>eff2d0ba5890b517ef5bc9d0269d6149556c12c8</id>
<content type='text'>
In commit 3e0a1f388, Richard tried to fix malloc alignments by using
 alignof (double __attribute_aligned__(sizeof (size_t))).
This doesn't work, since attribute_aligned overrides the alignment
rather than providing a minimum. On C6X, malloc returns four-byte
aligned values rather than the necessary eight-byte alignment.

It's simpler to use a comparison and pick the bigger of the two values,
so that's what I've done.

Signed-off-by: Bernd Schmidt &lt;bernds@codesourcery.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In commit 3e0a1f388, Richard tried to fix malloc alignments by using
 alignof (double __attribute_aligned__(sizeof (size_t))).
This doesn't work, since attribute_aligned overrides the alignment
rather than providing a minimum. On C6X, malloc returns four-byte
aligned values rather than the necessary eight-byte alignment.

It's simpler to use a comparison and pick the bigger of the two values,
so that's what I've done.

Signed-off-by: Bernd Schmidt &lt;bernds@codesourcery.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>memalign: include sys/param.h for MAX</title>
<updated>2011-03-16T19:10:26+00:00</updated>
<author>
<name>Bernhard Reutner-Fischer</name>
<email>rep.dot.nop@gmail.com</email>
</author>
<published>2011-03-16T19:09:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/uClibc-alpine/commit/?id=2f9445814cb01b460a1426d41e05c738a4a37f86'/>
<id>2f9445814cb01b460a1426d41e05c738a4a37f86</id>
<content type='text'>
libc/stdlib/malloc/memalign.c:22:1: warning: "MAX" redefined In file included from
./libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h:25,
                 from ./include/bits/libc-lock.h:36,
                 from ./include/bits/stdio-lock.h:23,
                 from ./include/bits/uClibc_mutex.h:71,
                 from libc/stdlib/malloc/malloc.h:135,
                 from libc/stdlib/malloc/memalign.c:18:
./include/sys/param.h:75:1: warning: this is the location of the previous definition

Signed-off-by: Bernhard Reutner-Fischer &lt;rep.dot.nop@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libc/stdlib/malloc/memalign.c:22:1: warning: "MAX" redefined In file included from
./libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h:25,
                 from ./include/bits/libc-lock.h:36,
                 from ./include/bits/stdio-lock.h:23,
                 from ./include/bits/uClibc_mutex.h:71,
                 from libc/stdlib/malloc/malloc.h:135,
                 from libc/stdlib/malloc/memalign.c:18:
./include/sys/param.h:75:1: warning: this is the location of the previous definition

Signed-off-by: Bernhard Reutner-Fischer &lt;rep.dot.nop@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>really fix missing __libc_drand48_data</title>
<updated>2011-03-10T12:02:19+00:00</updated>
<author>
<name>Peter S. Mazinger</name>
<email>ps.m@gmx.net</email>
</author>
<published>2011-03-10T12:02:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/uClibc-alpine/commit/?id=6f633b7aef2af2801d059acda48b424fc12c71ac'/>
<id>6f633b7aef2af2801d059acda48b424fc12c71ac</id>
<content type='text'>
Signed-off-by: Peter S. Mazinger &lt;ps.m@gmx.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Peter S. Mazinger &lt;ps.m@gmx.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "missing prototype of __libc_drand48_data fixed"</title>
<updated>2011-03-10T11:59:15+00:00</updated>
<author>
<name>Peter S. Mazinger</name>
<email>ps.m@gmx.net</email>
</author>
<published>2011-03-10T11:59:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/uClibc-alpine/commit/?id=c725e8ba5f049686ed7318d6b4710308677462c9'/>
<id>c725e8ba5f049686ed7318d6b4710308677462c9</id>
<content type='text'>
This reverts commit e2cea9b9edabe885b9bf2586f9541ffb8fe93f3f.

Signed-off-by: Peter S. Mazinger &lt;ps.m@gmx.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit e2cea9b9edabe885b9bf2586f9541ffb8fe93f3f.

Signed-off-by: Peter S. Mazinger &lt;ps.m@gmx.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
