glibc:pasky/fixes

Last commit made on 2010-11-16
Get this branch:
git clone -b pasky/fixes https://git.launchpad.net/glibc

Branch merges

Branch information

Name:
pasky/fixes
Repository:
lp:glibc

Recent commits

8bddf3f... by Petr Baudis <email address hidden>

Fix fstat() not trying to call fxstat64() on sparc64

sparc64 fxstat implementation should follow the same code path as on
i386, first trying fxstat64() and falling back to fxstat() only when
it is not available. Otherwise, nanosecond times resolution will not
be available.

sparc64 is unlike other 64-bit architectures in that fxstat64() has
not been historically always available in the kernel.

Solution by <email address hidden>.

fd5ba40... by Mike Frysinger

Make sure GLRO(dl_pagesize) is initialized properly on all archs

After a recent change to __getpagesize(), GLRO(dl_pagesize) is required
to be set. But that is only done at app init, and shared libraries
dlopened at runtime by static apps dont have their GLRO() state
initialized from the linux auxvec.

ia64/mips have long had similar behavior with their __getpagesize(), but
they have a DL_STATIC_INIT hook to sync some of the static GLRO() fields
to the dynamic GLRO() fields. Now that common linux code requires
GLRO(dl_pagesize) to be set, common linux code now needs that
DL_STATIC_INIT hook.

This patch takes the ia64 logic and promotes it to common code.

fb8fb84... by Jan Kratochvil

Fix incorrect backtrace unwinding through thread_start() on x86_64

Provide CFI for the outermost clone() to ensure proper unwinding stop
of gdb.

c8e6e9e... by Petr Baudis <email address hidden>

Allow aux_cache_file open()ing to fail silently even in the chroot mode.

The aux_cache fix of bug 11149 introduced a new bug - normally,
ldconfig -r never cares if the auxiliary cache is not available and
that is not a fatal problem, however this is not the case in case
of ldconfig -r when executed as non-root. In that case, ldconfig -r
fails hard unless var/cache/ldconfig/ exists within the chroot. This
patch fixes that.

b321e86... by Petr Baudis <email address hidden>

Make nscd load /etc/host.conf options in aicache

This patch makes sure _res_hconf is initialized before resolving is being done.

However, this would not be enough since nscd has its own _res_hconf due to
nscd/res_hconf.c; _res_hconf_init() would work on different _res_hconf instance
than the NSS routines. We just need to make sure nscd and glibc share the same
_res_hconf instance - this should not be a problem since users should run
matching versions of glibc and nscd anyway.

b9be604... by Petr Baudis <email address hidden>

Fix multiple nss_compat initgroups() bugs

Compat initgroups() is completely broken; the code will always set
skip_initgroups_dyn to true, so initgroups() will never be actually
called, but due to the nature of the code, setgrent() won't be called
either - thus, subsequent invocations of initgroups() will not return
the NIS group list anymore.

This is a simple patch that makes sure skip_initgroups_dyn is set only
in case initgroups is not available; it also attempts to handle the
unavailability of other NSS interfaces better.

31eb5a4... by Michael Matz <email address hidden>

Add proper unwind information for x86_64 _fini

It is impossible to reliably unwind the stack above _fini() on x86_64 since no
unwind information is provided for it and it modifies a stack register. This
matters for gdb backtracing - if a process crashes within a destructor, it can
frequently be essential to look at why the program began terminating in the
first place.

9fcff7a... by Petr Baudis <email address hidden>

Fix jn() precision problems around zero points of j0()

There appears to be a really nasty bug in jn() from fdlibm, which is
the foundation for most libm implementations (including glibc libm).
The zeroth-order j0() and first-order j1() cylindrical Bessel functions
are used to recursively generate the jn() value, but only the zeroth-order
Bessel function is used to normalize it; however, each of the functions
gets highly imprecise (approaching "bogus") near its zero point, making
the jn() value itself bogus.

But in fact, the zero points of j0() and j1() never coincide, thus j1()
should be used in case it is more precise than j0(). (That is, simply
when its value is further from zero.)

As an example, 2.4048255576957729_8 is the first zero of j0().
The proper value as calculated by Mathematica is 0.19899990535769...
However, jn() returns -inf on 64-bit arch, or 0.185007 on 32-bit arch.
With the proposed patch below, the returned value is 0.199000.

The fix is based on work by Steve Kargl and Tobias Burnus.

75134e4... by Jan Sembera <email address hidden>

nscd/hstcache.c: Propagate TRY_AGAIN properly to the clients.

When nscd host cache gets temporary error from nss, it should return
temporary error instead of permanent error to the application.

3540d66... by Andreas Schwab

Fix memory leak in fnmatch