Age | Commit message (Collapse) | Author |
|
Write a terminating '\0' to dest when the first byte of the encoded data
is 0. This corner case was previously missed.
Signed-off-by: Daniel Fahlgren <daniel@fahlgren.se>
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
|
It is possible to get stuck in an infinite loop when receiving a
specially crafted DNS reply. Exit the loop after a number of iteration
and consider the packet invalid.
Signed-off-by: Daniel Fahlgren <daniel@fahlgren.se>
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
|
If RTLD_NODELETE is passed to dlopen() rather than set on shared
library itself, flag propagation to rtld_flags is missed.
Test-case taken from glibc.
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
|
Some software make use of exp10, so add it.
Basic testing with LTP.
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
|
At least allow to compile a toolchain targeting nios2 without MMU.
|
|
|
|
At least allow to build a toolchain for hppa.
Sync some headers with glibc.
|
|
libc/sysdeps/linux/common/euidaccess.c:1:1: warning: "_GNU_SOURCE" redefined
In file included from <command-line>:0:
./include/libc-symbols.h:52:1: warning: this is the location of the previous definition
Signed-Off-By: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
|
|
Different define of latest kernel.
kernel define is
#define O_DIRECT 00040000 /* direct disk access hint */
#define O_DIRECTORY 00200000 /* must be a directory */
Yoshinori Sato <ysato@users.sourceforge.jp>
|
|
ARCH_NATIVE_BIT should in the first place be passed when building utils
for host (BUILD_CFLAGS-utils). It could also be passed when building utils
for target (CFLAGS-utils), but this is actually not necessary
as ARCH_NATIVE_BIT and __WORDSIZE are identical in this case.
Fixes 5ec4477584b69fe5f1410649b2eb3a63835fb649 (makes it actually work).
Signed-off-by: Eugene Rudoy <gene@freetz.org>
|
|
The order of special checks seems critical for some applications.
Xorg 1.18.0 fails to start with XNFreallocarray error.
Took me some time to run with MALLOC_DEBUG=2 to find out.
MALLOC_STANDARD is not affected.
|
|
fix infinite recursion on application exit triggered by linking
libc before libpthread.
Patch from OpenWrt.
Reported-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
Trivial fix.
Signed-Off-By: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
Patch from OpenWrt.
Reported-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
patch from OpenWrt.
Reported-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
Reported-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
glibc commits
d7a05d0728 test-skeleton: Kill any child process's offspring
cc8dcf96e7 test-skeleton: Support temporary files without memory leaks [BZ#18333]
Reported-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
Since more projects using two-stage cross-compile process we
cannot add libgcc_eh.a unconditionally. We must check if
a real file is referenced by the cross-compiler.
Toolchains with --disabel-shared build have a single
libgcc.a containing all required symbols.
Tested with a debug build for x86.
|
|
The required test for the internal NPTL used signals isn't
implemented.
|
|
open_cancel and open2_cancel have diffrent argument on open.
So can't alias this functions.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
|
|
If argument passing to register case (ex. -mregparam=3).
This case set all parameters set to register from caller.
But callee refer to stack. So can't get parameter.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
|
|
Invoke pthread_atfork handler cleanup when removing the associated DSO...
If a program loads a DSO (dlopen) that sets up a pthread_atfork handler(s), and
then subsequently closes the DSO, the handler(s) are left in place. If fork()
is subsequently called, the handlers are invoked even though the DSO has been
removed causing crashes or unpredictable code execution. This is because the
code in __cxa_finalize(atexit.c)to invoke the unregister_atfork() routine is
ifdef'd out with the comment that it hasn't been "looked into this yet...".
Refs.:
http://bugs.busybox.net/show_bug.cgi?id=8211
http://sourceware.org/bugzilla/show_bug.cgi?id=13502
Add test-case, enable cleanup for NPTL only.
Signed-off-by: John Ata <john.ata@baesystems.com>
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
|
|
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
|
|
Some applications needs it.
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
syncfs() was recently added (commit dfa593d4d). But man sync(2) specifies
that syncfs() is Linux-specific. This was overlooked in the original
commit so we add it to the set of Linux-specific functions supported by
uClibc.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Saves 0.6k bss with default buffer size(256).
text data bss dec hex filename
- 1172 8 408 1588 634 libc/misc/utmp/utent.os
- 429 0 256 685 2ad libc/unistd/getpass.os
+ 1208 8 28 1244 4dc libc/misc/utmp/utent.os
+ 471 0 4 475 1db libc/unistd/getpass.os
================================================================
+78 -632
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
|
|
Although gethostent() is obsoleted, there is no reason to keep it broken.
Fix two problems:
* commit f65e66078b "resolver: switch to config parser" leave an extra break
statement in case of GETHOSTENT in __read_etc_hosts_r. In result,
output buffer wasn't initialized at all.
* gethostent static buffer has insufficient size to store aliases,
so __read_etc_hosts_r always returns ERANGE. Restore ALIAS_DIM define.
Add test-case.
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
Save ~1k static space (.bss)
text data bss dec hex filename
- 68 0 126 194 c2 libc/inet/gethostent.os
- 79 0 460 539 21b libc/inet/gethostbyname2.os
- 83 0 460 543 21f libc/inet/gethostbyaddr.os
+ 98 0 24 122 7a libc/inet/gethostent.os
+ 110 0 24 134 86 libc/inet/gethostbyname2.os
+ 113 0 24 137 89 libc/inet/gethostbyaddr.os
==================================================================
+91 -974
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
Saves 3k bss with default buffer size(256).
text data bss dec hex filename
- 61 0 272 333 14d fgetgrent.os
- 61 0 284 345 159 fgetpwent.os
- 61 0 292 353 161 fgetspent.os
- 57 0 272 329 149 getgrent.os
- 61 0 272 333 14d getgrgid.os
- 61 0 272 333 14d getgrnam.os
- 57 0 284 341 155 getpwent.os
- 61 0 284 345 159 getpwnam.os
- 61 0 284 345 159 getpwuid.os
- 57 0 292 349 15d getspent.os
- 61 0 292 353 161 getspnam.os
- 61 0 292 353 161 sgetspent.os
+ 94 0 20 114 72 fgetgrent.os
+ 94 0 32 126 7e fgetpwent.os
+ 94 0 40 134 86 fgetspent.os
+ 87 0 20 107 6b getgrent.os
+ 94 0 20 114 72 getgrgid.os
+ 94 0 20 114 72 getgrnam.os
+ 87 0 32 119 77 getpwent.os
+ 94 0 32 126 7e getpwnam.os
+ 94 0 32 126 7e getpwuid.os
+ 87 0 40 127 7f getspent.os
+ 94 0 40 134 86 getspnam.os
+ 94 0 40 134 86 sgetspent.os
=====================================================
+387 -3024
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
One test fails to compile with a gcc ICE, so disable it for now.
|
|
|
|
Fix typo in d81e53c5fa "New test targets 'compile' and 'run'" commit,
MAKE_SRCS variable was never defined.
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
On avr32/cris the build with MALLOC fails, when compiling
linuxthreads.
|
|
Both architectures are more or less deprecated.
No Linux upstream support, no gcc support for uClinux.
|
|
order
Implement simplest variant of /etc/gai.conf to control getaddrinfo
IPv6/IPv4 addresses sorting. Keep the default sort order - IPv6 first,
IPv4 second. To invert it, create /etc/gai.conf containing single line:
precedence ::ffff:0:0/96 100
Example before:
$ nslookup security.debian.org 8.8.8.8
Server: 8.8.8.8
Address 1: 8.8.8.8 google-public-dns-a.google.com
Name: security.debian.org
Address 1: 2001:a78:5:0:216:35ff:fe7f:be4f villa.debian.org
Address 2: 2001:a78:5:1:216:35ff:fe7f:6ceb lobos.debian.org
Address 3: 195.20.242.89 wieck.debian.org
Address 4: 212.211.132.250 lobos.debian.org
Address 5: 212.211.132.32 villa.debian.org
After patch & precedence set in /etc/gai.conf:
$ nslookup security.debian.org 8.8.8.8
Server: 8.8.8.8
Address 1: 8.8.8.8 google-public-dns-a.google.com
Name: security.debian.org
Address 1: 195.20.242.89 wieck.debian.org
Address 2: 212.211.132.250 lobos.debian.org
Address 3: 212.211.132.32 villa.debian.org
Address 4: 2001:a78:5:0:216:35ff:fe7f:be4f villa.debian.org
Address 5: 2001:a78:5:1:216:35ff:fe7f:6ceb lobos.debian.org
bloat-o-meter report:
function old new delta
getaddrinfo 726 1138 +412
gaih_inet 2660 2692 +32
.rodata 16618 16643 +25
__gai_precedence - 1 +1
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/0 up/down: 882/0) Total: 470 bytes
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
Argp is an advanced support for parsing unix-style argument vectors.
In addition to the common getopt interface, it provides automatic
response
to `--help' and `--version' options and use of custom parser in
conjunction
with argp native option parser, among others.
Argp support is required by elfutils package and prelink.
In uClibc argp functionalities has been moved from C library to
libuargp.so
Further the libc.so linker script contains an AS_NEEDED entry so that
it doesn't need to link libuargp.so explicitely.
Disable argp test if feature disabled.
Signed-off-by: Salvatore Cro <salvatore.cro@st.com>
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
|
Commit e3c3bf2b58 introduce use of pselect6, but has following disadvantages:
* Use of userspace types in args67 structure - it breaks, for example,
configs when 32-bit uClibc-ng compiled against 64-bit kernel. Syscall
will always return EINVAL. We must use __kernel_* types and
__SYSCALL_SIGSET_T_SIZE.
* It have excess checks for NSEC_PER_SEC. Original code from select()
implementation has struct timeval => struct timespec conversion,
kernel select() syscall implementation do the same.
But none of libc versions (glibc, eglibc, musl) I know, perform similar
checks for pselect() - there is no structure fields conversions,
just struct timespec through all the calls.
To have such checks in uClibc-ng we need one example, at least.
* It is possible to avoid extra userspace reads from kernel code if
sigmask == NULL. I suggest to do it, for a few bytes cost.
* Commit didn't add test case to testsuite.
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
|
|
vfork internally unwinds stack up one frame, saving the original return
address in the a3 of the unwound frame. To do this in windowed ABI it
needs to exchange two topmost bits of the original return address and of
the helper entry point. Current code doesn't do it correctly for
addresses above 0x40000000, resulting in illegal instruction exception
for configurations that put code high, e.g. for noMMU.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
|
|
|
The R6 version of MIPS does not support the bltzal instruction. This
patch changes dl-startup.h and dl-sysdep.h to use lapc on R6 instead.
lapc is a new R6 insruction so older systems need to continue to use
bltzal in order to load register $31.
Signed-off-by: Steve Ellcey <sellcey@imgtec.com>
|
|
These MIPS specific versions of memcpy.S and memset.S are faster than
the current ones and match what is in newlib and glibc. They also have
support for the mips32r6 and mips64r6 architectures.
Signed-off-by: Steve Ellcey <sellcey@imgtec.com>
|
|
Linux has a pselect syscall since 2.6.something. Using it
rather than emulating it with sigprocmask+select+sigprocmask
is smaller code, and works properly. (The emulation has
race conditions when unblocked signals arrive before or
after the select)
The tv.nsec >= 1E9 handling comes from uclibc's linux select()
implementation, which itself uses pselect() internally if the
pselect syscall exists. I though it would be good to do the
same here.
Note that although the libc pselect() API has 6 arguments,
the linux kernel syscall as 7 arguments. There is an extra,
somewhat vestigial, sizeof the signal mask argument.
Signed-off-by: Nicolas S. Dade <nic.dade@gmail.com>
|
|
Avoid a lot of copy'n'paste code, no functionality change
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
Patch from OpenWrt.
Reported-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
Use the arch specific thread stack size for nptl if the size
returned by getrlimits exceeds it - fixes threads on systems
with only 16 MB RAM.
Patch from OpenWRT
Reported-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
Fixes compilation of some faulty applictions.
Patch from Freetz.org
Reported-by: Leonid Lisovskiy <lly.dev@gmail.com>
|