Age | Commit message (Collapse) | Author |
|
These failures no longer happen:
Failure: Test: scalb (2.0, 0.5) == NaN plus invalid exception
Failure: Test: scalb (3.0, -2.5) == NaN plus invalid exception
Failure: Test: rint (0.5) == 0.0
Failure: Test: rint (1.5) == 2.0
Failure: Test: rint (2.5) == 2.0
Failure: Test: rint (3.5) == 4.0
Failure: Test: rint (4.5) == 4.0
Failure: Test: rint (-0.5) == -0.0
Failure: Test: rint (-1.5) == -2.0
Failure: Test: rint (-2.5) == -2.0
Failure: Test: rint (-3.5) == -4.0
Failure: Test: rint (-4.5) == -4.0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Fixed failures:
Failure: Test: pow (1, NaN) == 1
Failure: Test: pow (1, inf) == 1
Failure: Test: pow (-1, inf) == 1
Failure: Test: pow (1, -inf) == 1
Failure: Test: pow (-1, -inf) == 1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
This error is gone:
Failure: Test: modf (NaN, &x) == NaN
Result:
is: -0.00000000000000000000e+00 -0
should be: nan nan
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
test/math was not running at all, presume it has bit rotted:
It was trying to run libm-test.c as if it is a binary.
It was looking for libm-test-ulps (file with allowed
errors in lower bits) in arch-specific dirs which do not exist
in uclibc, as a result wrong file (libm-test.inc) was used instead.
Test failure was not showing the error result, user had to
fish it out from some .out files.
I added libm-test-ulps-ARCH files from recent glibc,
this filtered out a lot of false positives.
For example, cosf(M_PI_6l * 4.0) ideally should be -0.5,
we are getting -0.50000005047356477217, and this isn't
a failure (the difference is one lowest bit of mantissa).
"make check UCLIBC_ONLY=1 VERBOSE=1" still fails,
but not as catastrophically as before.
For the record, the failure occurs on the stage where we check
32-bit float functions, these tests fail:
Failure: Test: modf (NaN, &x) == NaN
Failure: Test: ilogb (NaN) == FP_ILOGBNAN plus exceptions allowed
Failure: Test: scalb (2.0, 0.5) == NaN plus invalid exception
Failure: Test: scalb (3.0, -2.5) == NaN plus invalid exception
Failure: Test: scalb (0, NaN) == NaN
Failure: Test: scalb (1, NaN) == NaN
Failure: Test: scalb (0, inf) == NaN plus invalid exception
Failure: Test: scalb (-0, inf) == NaN plus invalid exception
Failure: Test: scalb (1, inf) == inf
Failure: Test: scalb (-1, inf) == -inf
Failure: Test: scalb (inf, -inf) == NaN plus invalid exception
Failure: Test: scalb (-inf, -inf) == NaN plus invalid exception
Failure: Test: scalb (1, NaN) == NaN
Failure: Test: scalb (0, NaN) == NaN
Failure: Test: scalb (inf, NaN) == NaN
Failure: Test: pow (1, NaN) == 1
Failure: Test: pow (1, inf) == 1
Failure: Test: pow (-1, inf) == 1
Failure: Test: pow (1, -inf) == 1
Failure: Test: pow (-1, -inf) == 1
Failure: Test: rint (0.5) == 0.0
Failure: Test: rint (1.5) == 2.0
Failure: Test: rint (2.5) == 2.0
Failure: Test: rint (3.5) == 4.0
Failure: Test: rint (4.5) == 4.0
Failure: Test: rint (-0.5) == -0.0
Failure: Test: rint (-1.5) == -2.0
Failure: Test: rint (-2.5) == -2.0
Failure: Test: rint (-3.5) == -4.0
Failure: Test: rint (-4.5) == -4.0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
An architecture that _may_ have a MMU (and thus implements
the msync syscall), but for which the kernel and uClibc are built as
noMMU, we have a stub for msync.
Thanks to Steven J. Magnani for noticing.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
If there was an error during syscall then after it's completion a3
register holds a non-zero value and v0 holds an actual error code which
should be saved in errno. This can be achieved by calling
__syscall_error with the value from v0 as a parameter. So this value
should be stored in a0, but the appropriate assembly instructions are
missing. Fixed this now by adding "move a0, v0".
I think it was once fixed by 58c5f8ba4cdf62342d05a546d15404cbbb3c4e07
but then something went wrong. Again...
Signed-off-by: Alexander Gordeev <lasaine@lvk.cs.msu.su>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
text data bss dec hex filename
- 318 4 0 322 142 libc/pwd_grp/lckpwdf.o
+ 312 4 0 316 13c libc/pwd_grp/lckpwdf.o
- 166 0 1 167 a7 libc/stdlib/abort.o
+ 157 0 1 158 9e libc/stdlib/abort.o
- 42 0 0 42 2a libc/sysdeps/linux/common/pause.o
+ 27 0 0 27 1b libc/sysdeps/linux/common/pause.o
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
...or rather, it WILL BE code shrink when gcc become clever enough
to not emit a second, useless XORing of ebx:
31 db xor %ebx,%ebx
85 c0 test %eax,%eax
74 11 je 73 <__GI_sleep+0x73>
31 db xor %ebx,%ebx <=== ?!
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
__USE_EXTERN_INLINES was unused and had bit-rotted, had to fix it
when it didn't work as intended at first.
text data bss dec hex filename
- 168 0 0 168 a8 libc/unistd/sleep.o
+ 146 0 0 146 92 libc/unistd/sleep.o
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
text data bss dec hex filename
- 197 0 0 197 c5 libc/unistd/sleep.o
+ 168 0 0 168 a8 libc/unistd/sleep.o
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
GCC can emit prologue/epilogue code for the functions in various
different cases:
- frame pointers
- PIC build (to load ebx for indirect calls/jumps)
- forced stack smashing protection
If we used jump in such cases, we'd corrupt the call stack and
crash.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
It can be easily reconstructed, since it's obvious
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
Use less stack by using same "sigset_t set" object for new and saved
signal set, remove redundant clearing of set, and do not save/restore
errno around sigprocmask(SIG_SETMASK) - it never changes it.
While at it, improve comments and make code style consistent
across sleep.c file.
text data bss dec hex filename
- 242 0 0 242 f2 libc/unistd/sleep.o
+ 197 0 0 197 c5 libc/unistd/sleep.o
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
No code changes according to objdump.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
objdump confirms that I did not mess it up.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
Example:
--ppfs->maxposarg;
Verified with objdump that no code is changed
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
God knows this file is hard to read as-is, some readability improvement
is in order.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
We increase line buffer size, reduce MAXALIASES and make sure we don't
segfault when there are too manuy aliases in /etc/protocols.
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Reduce MAXALIASES to something lower. There will probably never be
need for more than 1 alias but we allow a few extra.
While here we alos fix segfault when there are too many aliases.
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Don't try to be smart by dynamically realloc buffersize as it doesn't
work. Instead, be simple and allocate a buffer big enough.
This fixes a memory leak when calling getserv{ent,byname,byport}
multiple times.
To save memory we reduce number of max aliases. We seldomly will need
more than 1 anyways. While here, fix segfault that happened if there
were too many aliases.
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
If line is longer then size of given buffer and buffer is not allocated by
the config parser itself, then discard rest of line.
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
We must always initialize line pointer since data pointer might
have changed due to a realloc (in getserv.c for example).
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This fixes issue introduced by 72e1a1ce186c39f07282398e2af9eb0253e60f15
This should also fix the following testcase to exit with error rather
than cause an endless loop.
int main(void) {
if (getservbyname("non-existing", "udp") == NULL)
err(1, "getservbyname");
return 0;
}
Reported by Pirmin Walthert
http://lists.uclibc.org/pipermail/uclibc/2010-August/044277.html
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
We need to update the parser->line pointer on realloc and do not
initialize the token array til after the potensial realloc in
bb_get_chunk_with_continuation().
While here, also replace a realloc() with malloc() where pointer always
is NULL.
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
return value of pipe on success is supposed to be 0
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
Protected symbols should not be overridden by
symbols from other modules. Such symbols are exported
i.e. globally visible, but references from whithin
defining modules are satisfied locally.
Signed-off-by: Salvatore Cro <salvatore.cro@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
No functional changes, just a code tidy-up.
Please keep them sorted in future changes.
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
NPTL library needs both madvise and statfs symbols, that are guarded
by UCLIBC_LINUX_SPECIFIC option. This fix provides these symbols too
when NPTL is used, indipendently by UCLIBC_LINUX_SPECIFIC choice.
Otherwise libpthread link fails as below:
LD libpthread-0.9.32-git.so
libpthread/nptl/libpthread_so.a(pthread_create.oS): In function `__free_tcb':
pthread_create.c:(.text+0x1184): undefined reference to `madvise'
libpthread/nptl/libpthread_so.a(sem_open.oS): In function `__where_is_shmfs':
sem_open.c:(.text+0x764): undefined reference to `statfs'
collect2: ld returned 1 exit status
make: *** [lib/libpthread.so] Error 1
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
For those archs that provide non multiplexed socket calls
it possible to implement the lib C wrappers without calling the
multi-purpose __socketcall. For a subset of these functions that
are cancellation point, it needs to correctly handle cancellation.
Signed-off-by: Francesco Rundo <francesco.rundo@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
All archs have now moved their generic sysdep.h header from
sysdeps/generic to sysdeps/common directory, so it is possible
to remove the sysdeps/generic directory from the include list.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Add canonicalize_file_name function and its related tests.
Required by elfutils and coreutils (readlink).
Signed-off-by: Salvatore Cro <salvatore.cro@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
tests: Added several nptl tests from glibc 2.10.1
Signed-off-by: Salvatore Cro <salvatore.cro@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
After exploring different prefetch distance-degree combinations
in this new update of the memcpy function, a new loop has been added
for moving many cache lines with an aggressive prefetching schema.
Prefetch has been removed when move few cache line aligned blocks.
As final result, this memcpy gives us the same performances for small
sizes (we already had!) and better numbers for big copies.
In case of SH4-300 CPU Series, benchmarks show a gain of ~20% for sizes
from 4KiB to 256KiB.
In case of the SH4-200, there is a gain of ~40% for sizes bigger than
32KiB.
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
With this patch the movca.l instruction is used within the memset.
The current memset implementation only uses the FPU and there is
an real gain for all the sizes.
Adding the movca.l instruction numbers always are better than the generic code.
There is a big gain for size greater than 64 KiB but number are worst for 4-32KiB
sizes compared with the implementation without movca.l.
Time Memory Bandwidth (Mbytes)
-------------------------------------------------
Generic SH4 SH4
(FPU) (FPU+movca.l)
-------------------------------------------------
512 1143 1998 1596
1 KiB 1273 2567 1915
2 KiB 1350 2993 2128
4-32KiB 1391 3262 2252
64KiB-16MiB 170 186 *830*
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
According to POSIX.1-2008 standard, the following syscalls shall be
cancellation points : waitid, sleep, fdatasync, ppoll.
Further, if generic syscall is not available and stubs are
configured, provide the stub implementation for function.
Signed-off-by: Salvatore Cro <salvatore.cro@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
A new shared object, libubacktrace.so.0 is added to uClibc
to provide backtrace functions to support application self-debugging.
This set of functions requires to dynamically load libgcc_s.so so they
need to call dlopen/dlsym that are provided by libdl. For this reason
they cannot be included into libc.so.0 but are provided by a new library.
User application that wants to use backtrace needs to be compiled with
-fexceptions option and -rdynamic to get full symbols printed and must be
linked against libubacktrace.so
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
misc: Added support for accessing user accounting database based
on utmpx structure.
Signed-off-by: Salvatore Cro <salvatore.cro@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
We need dl-tls.c for static libc or we will get missing symbols when
linking thinkgs like openssl static.
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
tests: some cleanings on nptl tests' dependencies.
Signed-off-by: Salvatore Cro <salvatore.cro@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Add an #ifdef to avoid using TLS structures when TLS is not enabled.
Signed-off-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
This patch fixes the following build error:
CC libc/misc/internals/__h_errno_location.os
CC libc/misc/internals/parse_config.os
libc/misc/internals/parse_config.c: In function
'bb_get_chunk_with_continuation':
libc/misc/internals/parse_config.c:77: error: 'PAGE_SIZE' undeclared (first use in this function)
libc/misc/internals/parse_config.c:77: error: (Each undeclared identifier is reported only once
libc/misc/internals/parse_config.c:77: error: for each function it appears in.)
make[2]: *** [libc/misc/internals/parse_config.os] Error 1
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Indeed unistd.h header does export '__getpgid' by default, while
uClibc provide only 'getpgid' implementation. The 'getpgid' symbol
is exported by standard header if __USE_XOPEN_EXTENDED is defined.
This patch alignes uClibc implementation with standard header (matching
with glibc behaviour).
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|