| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: Ic243f6583e4f435899d01c7845dddacacbfc916e
|
|
|
|
| |
Change-Id: I9b88cbcec51b6f1dbac2780a9bf82851bd6cc87c
|
|
|
|
| |
Change-Id: Icff5b859ae58067bfa34430d3f5684335fe063b4
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: 19099838
Change-Id: Ie82967a60b5cec61a8bdd1e0e4a03738d01944f8
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Two parts of tests are added:
1. Compile time warnings for gcc checking built-in functions.
2. Compile time errors for each errordecl() in bionic.
Bug: 19234260
Change-Id: Iec6e4a8070c36815574fe9e0af9595d6143a4757
|
| |
| |
| |
| |
| | |
Bug: 19172514
Change-Id: I05016577858a02aca7d14e75e6ec28abc925037c
|
| |
| |
| |
| |
| | |
Bug: 17589740
Change-Id: Ifab521da379a33bf0a7bf11c21386f936f0d494c
|
| |
| |
| |
| | |
Change-Id: Iad460e89755051cdb99593cbf42c97d9a359f32b
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The kernel system call faccessat() does not have any flags arguments,
so passing flags to the kernel is currently ignored.
Fix the kernel system call so that no flags argument is passed in.
Ensure that we don't support AT_SYMLINK_NOFOLLOW. This non-POSIX
(http://pubs.opengroup.org/onlinepubs/9699919799/functions/access.html)
flag is a glibc extension, and has non-intuitive, error prone behavior.
For example, consider the following code:
symlink("foo.is.dangling", "foo");
if (faccessat(AT_FDCWD, "foo", R_OK, AT_SYMLINK_NOFOLLOW) == 0) {
int fd = openat(AT_FDCWD, "foo", O_RDONLY | O_NOFOLLOW);
}
The faccessat() call in glibc will return true, but an attempt to
open the dangling symlink will end up failing. GLIBC documents this
as returning the access mode of the symlink itself, which will
always return true for any symlink on Linux.
Some further discussions of this are at:
* http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003617.html
* http://permalink.gmane.org/gmane.linux.lib.musl.general/6952
AT_SYMLINK_NOFOLLOW seems broken by design. I suspect this is why this
function was never added to POSIX. (note that "access" is pretty much
broken by design too, since it introduces a race condition between
check and action). We shouldn't support this until it's clearly
documented by POSIX or we can have it produce intuitive results.
Don't support AT_EACCESS for now. Implementing it is complicated, and
pretty much useless on Android, since we don't have setuid binaries.
See http://git.musl-libc.org/cgit/musl/commit/?id=0a05eace163cee9b08571d2ff9d90f5e82d9c228
for how an implementation might look.
Bug: 18867827
Change-Id: I25b86c5020f3152ffa3ac3047f6c4152908d0e04
|
| |
| |
| |
| |
| |
| |
| | |
dup3's behavior differs from dup2 in this case, so we need to paper
over that in the C library.
Change-Id: I313cd6f226db5e237f61866f324c5ecdd12bf762
|
| |
| |
| |
| |
| |
| |
| | |
Used by elfutils. On the bright side, they stopped using __mempcpy.
Bug: 18374026
Change-Id: Id29bbe6ef1c5ed5a171bb6c32182f129d8332abb
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch adds more tests for math functions to address coverage
issue of math functions discussed in:
https://android-review.googlesource.com/#/c/49653/
https://android-review.googlesource.com/#/c/94780/
These are data sets used in regression tests for the Intel the math library (libm). They were collected over a long period of testing various libm implementations.
The data sets contain function specific data (special and corner cases such as +/-0, maximum/minimum normalized numbers, +/-infinity, QNaN/SNaN, maximum/minimum denormal numbers, arguments that would produce close to overflow/underflow results, known hard-to-round cases, etc), implementation specific data (arguments close to table look-up values for different polynomial approximations, worst cases for range reduction algorithms) and other data with interesting bit patterns.
The reference values are computed with Maple and were converted into hexadecimal format.
Change-Id: I7177c282937369eae98f25d02134e4fc3beadde8
Signed-off-by: Jingwei Zhang <jingwei.zhang@intel.com>
Signed-off-by: Mingwei Shi <mingwei.shi@intel.com>
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The overflow's actually in the generic C implementation of memchr.
While I'm here, let's switch our generic memrchr to the OpenBSD version too.
Bug: https://code.google.com/p/android/issues/detail?id=147048
Change-Id: I296ae06a1ee196d2c77c95a22f11ee4d658962da
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
Bionic never had this bug, but since the proposed fix is to remove the NDK's
broken code, we should add a regression test here.
Bug: https://code.google.com/p/android/issues/detail?id=80199
Change-Id: I4de21b5da9913cef990bc4d05a7e27562a71a02b
|
|/
|
|
|
|
|
|
|
|
|
|
| |
SELinux denies access to some files in /sys, so we can't just trawl
through that asserting general truths. Instead, create a small known
tree.
Sadly neither ftw nor nftw takes user callback data, otherwise it would
be nice to assert that we visit all the expected nodes.
Bug: 19252748
Change-Id: Ib5309c38aaef53e6030281191a265a8d5a619044
|
|
|
|
|
|
|
|
| |
When there is an error detected, the code runs forever and then times
out without any indication of what happened. Change it so that error
messages are printed and the test fails.
Change-Id: Id3160fc2f394984de0157356594fd8b40de66b4a
|
|
|
|
|
| |
Bug: 19220800
Change-Id: I4245b1270363544cd5f083fe7ea7d9b11b46cdc0
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The two bugs are very closely related and code amount is very small,
So I think they may be fixed in one change.
Bug: 19128558
Bug: 19129994
Change-Id: I44a35398e64dfca7e9676428cb8f4026e8f6e488
|
|\ \
| | |
| | |
| | | |
test."
|
| |/
| |
| |
| |
| | |
Bug: 19220800
Change-Id: Ie75c640183c4a41a499556fefb4f824a134a5fb1
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| | |
Bug: 19216648
Change-Id: I7b12955bdcad31c13bf8ec2740ff88ba15223ec0
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Many libc functions have an option to not follow symbolic
links. This is useful to avoid security sensitive code
from inadvertantly following attacker supplied symlinks
and taking inappropriate action on files it shouldn't.
For example, open() has O_NOFOLLOW, chown() has
lchown(), stat() has lstat(), etc.
There is no such equivalent function for chmod(), such as lchmod().
To address this, POSIX introduced fchmodat(AT_SYMLINK_NOFOLLOW),
which is intended to provide a way to perform a chmod operation
which doesn't follow symlinks.
Currently, the Linux kernel doesn't implement AT_SYMLINK_NOFOLLOW.
In GLIBC, attempting to use the AT_SYMLINK_NOFOLLOW flag causes
fchmodat to return ENOTSUP. Details are in "man fchmodat".
Bionic currently differs from GLIBC in that AT_SYMLINK_NOFOLLOW
is silently ignored and treated as if the flag wasn't present.
This patch provides a userspace implementation of
AT_SYMLINK_NOFOLLOW for bionic. Using open(O_PATH | O_NOFOLLOW),
we can provide a way to atomically change the permissions on
files without worrying about race conditions.
As part of this change, we add support for fchmod on O_PATH
file descriptors, because it's relatively straight forward
and could be useful in the future.
The basic idea behind this implementation comes from
https://sourceware.org/bugzilla/show_bug.cgi?id=14578 , specifically
comment #10.
Change-Id: I1eba0cdb2c509d9193ceecf28f13118188a3cfa7
|
| |
| |
| |
| | |
Change-Id: I95291e2febf7b497c1d9f37fd7fa9acdd21e86a4
|
| |
| |
| |
| |
| |
| |
| | |
And remove the test for FD_ZERO fortification, which never made much
sense anyway.
Change-Id: Id1009c5298d461fa4722189e8ecaf22f0c529536
|
|/
|
|
| |
Change-Id: I4426d0c7c1bfe3b0028a674f72d1c3b9d883d6af
|
|
|
|
|
| |
Bug: 19130480
Change-Id: I0d3df70ee8f692581cc4b9b742c5f347259fd0d2
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: 19130330
Change-Id: Id6a60570a8aab6ae7259ff228b3801285b378f77
|
|\ \
| |/
|/| |
|
| |
| |
| |
| | |
Change-Id: I17cc056b185755e0b91de096b5ceefee4f4e0b3a
|
|/
|
|
|
| |
Bug: 19109188.
Change-Id: Idfe769ac652bf37642da24e4abb6061ca861d57e
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: 19109500
Change-Id: Ib18f90ad522e66ea62dd4e02e314585d9b36e15f
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | | |
Bug: https://code.google.com/p/android/issues/detail?id=79170
Change-Id: Id91765fac45124545e2674a5b2c814707c1a448b
|
|/ /
| |
| |
| | |
Change-Id: If2fc97134340fd09ec2583b666ace2f673cbdf66
|
| |
| |
| |
| |
| |
| |
| |
| | |
gcov does writes after reads on the same stream, but the bulk read optimization
was clobbering the FILE _flags, causing fwrite to fail.
Bug: 19129055
Change-Id: I9650cb7de4bb173a706b502406266ed0d2b654d7
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Implement refcounter based data protection guard
to avoid unnecessary calls to mprotect when dlopen/dlclose
is called from a constructor.
Bug: 19124318
Big: 7941716
Change-Id: Id221b84ce75443094f99756dc9950b0a1dc87222
|
|/ /
| |
| |
| | |
Change-Id: Icc2ebf64bd1da1687bf313fe7a5640155c5795d8
|
| |
| |
| |
| | |
Change-Id: Iad70e6bd4cb7cec9e0ece500a540e4dadc83d92e
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Another sizeof/strlen screwup caused by trying to be too clever. Use
std::string instead.
Also fix all the ASSERT_STREQ calls in this file that had the arguments
the right^Wwrong way round. If I ever see Kent Beck...
Change-Id: I47a1bdfee99cf4e7bed9b398f3158a308fbcf1e8
|
|/
|
|
| |
Change-Id: I53a7f1428fd27c0b2a5c80f2e8af4845d17f5b4b
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old __isthreaded hack was never very useful on Android because all user
code runs in a VM where there are lots of threads running. But __fsetlocking
lets a caller say "I'll worry about the locking for this FILE*", which is
useful for the normal case where you don't share a FILE* between threads
so you don't need any locking.
Bug: 17154740
Bug: 18593728
Change-Id: I2a8dddc29d3edff39a3d7d793387f2253608a68d
|