Commit graph

18752 commits

Author SHA1 Message Date
Dan Albert
e5dd632e43 Move strncpy fortify into android-21.
__strncpy_chk2 wasn't added until android-21.

Test: make checkbuild
Bug: None
Change-Id: I527f88aca55ef5010e12ece18abbdce3d54ce252
2016-09-08 13:08:47 -07:00
Dan Albert
519a4f2c05 Run genversion-scripts.py.
Test: make checkbuild
Bug: None
Change-Id: Ib81bd82db1397a8fc628bc32d9c244188865d58a
2016-09-08 13:08:47 -07:00
Dan Albert
ea4717fceb Annotate libm.map.txt.
Test: make checkbuild
Bug: http://b/30465923
Change-Id: I9a57fca0b73fb9017914e8f9984886b7d0635d28
2016-09-08 13:08:47 -07:00
Josh Gao
3afa18104b Merge "versioner: add support for __VERSIONER_NO_GUARD." 2016-09-08 18:48:52 +00:00
Josh Gao
fff29fe17a versioner: add support for __VERSIONER_NO_GUARD.
Add an attribute that tells the preprocessor not to guard a
declaration, primarily for use with symbols that get reexported by
libc++ of the form `namespace std { using ::wctrans; }`.

Bug: http://b/28178111
Change-Id: I08c8751214797e37e8f26e7f7416a19e81c2bb4c
2016-09-07 18:34:39 -07:00
Dimitry Ivanov
bb148b7cee Merge "Silently ignore empty path elements" 2016-09-07 23:20:24 +00:00
Treehugger Robot
8327a1707b Merge "Fix sscanf/wcstod parsing of NaNs." 2016-09-07 22:58:09 +00:00
Elliott Hughes
7f0849fd11 Fix sscanf/wcstod parsing of NaNs.
The parsefloat routines -- which let us pass NaNs and infinities on to
strto(f|d|ld) -- come from NetBSD.

Also fix LP64's strtold to return a NaN, and fix all the architectures
to return quiet NaNs.

Also fix wcstof/wcstod/wcstold to use parsefloat so they support hex
floats.

Lots of new tests.

Bug: http://b/31101647
Change-Id: Id7d46ac2d8acb8770b5e8c445e87cfabfde6f111
2016-09-07 15:01:54 -07:00
Dimitry Ivanov
01fdb6ad57 Silently ignore empty path elements
resolve_paths function used to print a warning if an input path
was empty. This commit fixes this by explicitly skipping
empty paths during path resolution.

Test: Run adb shell LD_LIBRARY_PATH=: /system/bin/ping
Test: make sure there are no warnings
Bug: http://b/31346121
Change-Id: Ifd79040943dc62fc6e07d9828ff91d1050572809
2016-09-07 14:48:27 -07:00
Tamas Berghammer
a2b947e0a5 Merge "Fix unittests broken by 545808a" 2016-09-07 15:14:09 +00:00
Tamas Berghammer
4bef28161f Fix unittests broken by 545808a
Change-Id: I590af5958e4dcb772b710be965ed6c99cd1d9234
2016-09-07 16:12:02 +01:00
Treehugger Robot
52ea18658f Merge "Fix time.mktime_EOVERFLOW for LP32." 2016-09-06 22:38:26 +00:00
Elliott Hughes
47126edb90 Fix time.mktime_EOVERFLOW for LP32.
Times before 1901-12-13 *underflow* on LP32, making the year 1900 a bad
choice for success case.

Bug: http://b/31305222
Change-Id: I20d4885c80b57707225580db044abc8948a55fdc
2016-09-06 13:34:15 -07:00
Treehugger Robot
bfad958982 Merge "Fix "Unknown token error" when upstream clang is used." 2016-09-06 17:05:44 +00:00
MinSeong Kim
d30bc9e74b Fix "Unknown token error" when upstream clang is used.
Simple fix for the above error caused by the location
of a label "1:"

Change-Id: I9b1c816871e95f9bcf8135a5e0cc88de65771315
Signed-off-by: MinSeong Kim <minseong.kim@linaro.org>
2016-09-06 05:59:55 +01:00
Josh Gao
9f798246ba Merge "Revert "Update getentropy_linux.c from upstream."" 2016-09-02 08:41:15 +00:00
Josh Gao
b3fbee449c Revert "Update getentropy_linux.c from upstream."
This reverts commit 5faef47e43.

Bug: http://b/31251721
Change-Id: I20a091f385fb77ccc68b8d9fb1d2aee3dec0d0ff
2016-09-02 08:39:29 +00:00
Josh Gao
2f159f0bca Merge "Revert "Attempt to use arc4random where getauxval(AT_RANDOM) is used."" 2016-09-02 05:49:21 +00:00
Josh Gao
60d052dda6 Revert "Attempt to use arc4random where getauxval(AT_RANDOM) is used."
This reverts commit 78a52f19bb.

Change-Id: Ia72501ad0b81e894d67e5ce59b597397c11acfa5
2016-09-02 05:48:11 +00:00
Josh Gao
85b15b1d0b Merge changes I6932803a,Ia65c038e
* changes:
  Attempt to use arc4random where getauxval(AT_RANDOM) is used.
  Update getentropy_linux.c from upstream.
2016-09-01 22:40:12 +00:00
Treehugger Robot
dd14725eeb Merge "cc_test_library now creates shared libraries too" 2016-09-01 01:27:01 +00:00
Josh Gao
78a52f19bb Attempt to use arc4random where getauxval(AT_RANDOM) is used.
When arc4random can get entropy (which is true for basically everyone
but init on kernels that don't support getrandom), use it instead of
AT_RANDOM.

Bug: http://b/29622562
Change-Id: I6932803af2c477e65562ff531bd959f199fad1df
2016-08-31 18:01:05 -07:00
Josh Gao
5faef47e43 Update getentropy_linux.c from upstream.
Bug: http://b/29622562
Change-Id: Ia65c038effa6e806c325a8e93c1fe80c50a9f2c9
2016-08-31 18:00:47 -07:00
Dan Willemsen
4156770d84 cc_test_library now creates shared libraries too
Make these compile as static libraries by properly declaring their
dependencies.

I turned off the shared version of libBionicTests because it produces
this linker warning (treated as error):

external/libcxx/include/sstream:859: warning: relocation refers to
discarded section

Change-Id: I2e1448b47a441b273d208ebd068d0d22e340a0ff
2016-08-31 16:35:01 -07:00
Treehugger Robot
af071ed598 Merge "List failing tests last, to reduce the amount of scrolling." 2016-08-31 23:13:29 +00:00
Elliott Hughes
a456fae45f List failing tests last, to reduce the amount of scrolling.
On actual devices, we have a lot of slow tests. Warnings about those
cause cause the failed tests to scroll off the display.

Also replace the made-up word "warnline".

Change-Id: I6b579521a21b56da8a1add08cd34888fc902646e
2016-08-31 14:49:32 -07:00
Treehugger Robot
6d7a1eec4c Merge "Remove $(module)_install_to_out_data flag from test makefile" 2016-08-30 21:16:33 +00:00
Elliott Hughes
af730e63a3 Merge "Fix SysV IPC test failures on Android devices." 2016-08-30 19:35:04 +00:00
Dimitry Ivanov
b16e443239 Remove $(module)_install_to_out_data flag from test makefile
Use non-empty $(module)_install_to_out_data_dir as indication
of custom target dir for a library.

Bug: http://b/22182538
Test: build and run bionic-unit-tests --gtest_filter=dl*:Dl*
Change-Id: Ibfc87f45084a6fe2f487ca1b17a7625a8d8ec707
2016-08-30 11:38:43 -07:00
Christopher Ferris
ac04d34573 Merge "Update to kernel headers v4.7.2." 2016-08-29 19:14:10 +00:00
Christopher Ferris
106b3a8a7d Update to kernel headers v4.7.2.
Modify the kernel header update script to rename C++ keyword
struct members to something else. This fixes problems when including
these kernel files in C++ code.

Also, make a manual change to linux/fib_rules.h and comment out the
value FRA_PAD since it conflicts with a special android kernel value
FRA_UID_START that has not been upstreamed yet.

Test: Built aosp_angler, aosp_x86_64, aosp_mips (bionic only)
Test: Booted on angler and ran bionic unit tests
Test: Built these changes in internal master

Change-Id: Ia22b7e3ca409404696dba76311f49157f4a9ceed
2016-08-29 12:07:13 -07:00
Treehugger Robot
b04c771581 Merge "Fix pty.bug_28979140 test in Bionic" 2016-08-27 18:57:47 +00:00
Alex Vakulenko
e9014474c9 Fix pty.bug_28979140 test in Bionic
The test relies on the fact/assumes that CPU 0 is available to the
test process. This is not necessarily the case. Instead of allocating
CPU 0 to the main thread, find the first available CPU and use that
instead.

BUG=b/29991929
TEST=All Bionic unit tests pass

(cherrypick of 766275e7f697c30164678e1fed55b2a2fcbf8546.)

Change-Id: I36b311cdba57112d663d652757fd5114183fc780
2016-08-27 09:12:31 -07:00
Elliott Hughes
40bae4fc89 Fix SysV IPC test failures on Android devices.
SysV IPC has been compiled out of all our kernels.

Change-Id: I1294459697ed7dff4f21af5c7b04c8b3d3649329
2016-08-26 19:23:39 -07:00
Treehugger Robot
3db601360f Merge "Initialize __abort_message_ptr in linker's copy of libc" 2016-08-27 01:22:09 +00:00
Dimitry Ivanov
864f3ec186 Initialize __abort_message_ptr in linker's copy of libc
The linker calls to __libc_fatal resulted in tombstones
with missing abort message. This commit fixes it by
initializing __abort_message_ptr for the linker's copy
of libc.

Bug: http://b/31095185
Change-Id: I883d654d7fd0ef309c80f8021202b6bfd5d5cea5
2016-08-26 17:03:01 -07:00
Christopher Ferris
0b1a282650 Merge "Fix a typo in the debug malloc usage info" 2016-08-26 17:58:10 +00:00
Treehugger Robot
6313116b74 Merge "Revert "Switch back to the BSD exec for now."" 2016-08-26 17:54:48 +00:00
Elliott Hughes
e19c672a06 Revert "Switch back to the BSD exec for now."
This reverts commit 18c31d7f4c.

63615066d9 fixed the bug.

Change-Id: I1d59c4be6ad1a05b23dce0198737f0789d7e034a
2016-08-26 16:15:57 +00:00
Elliott Hughes
6395a3047a Merge "Fix execvp/execvpe behavior with absolute paths and ENOEXEC." 2016-08-26 16:14:52 +00:00
Tamas Berghammer
545808a608 Fix a typo in the debug malloc usage info
Change-Id: I010fdc6c228a5f64edfef1c267cde7a2eef5190b
2016-08-26 12:34:16 +01:00
Treehugger Robot
a1e5972278 Merge "linker: stat /proc/self/exe instead of executable_path" 2016-08-26 04:32:54 +00:00
Dimitry Ivanov
f4e3ebe1e3 linker: stat /proc/self/exe instead of executable_path
The absolute path to an executable may no longer be valid for
example when the file is unlinked immediately after exec.
Using /proc/self/exe instead of absolute path solves this problem.

Bug: http://b/31084669
Test: Run the app from http://b/31084669 make sure executable starts
Test: by checking ps and /proc/<pid>/exe
Change-Id: I5c819f39ef0fc4fc71b05de71e8af9ede611f04c
(cherry picked from commit 7da4bbbe87)
2016-08-25 19:41:23 -07:00
Treehugger Robot
0e99e40892 Merge "Switch back to the BSD exec for now." 2016-08-26 01:44:29 +00:00
Elliott Hughes
63615066d9 Fix execvp/execvpe behavior with absolute paths and ENOEXEC.
Bug: http://b/31091962
Change-Id: Id0b3d41868f5e3ed1ccf618bfefb46609367bc9a
2016-08-25 17:40:27 -07:00
Elliott Hughes
18c31d7f4c Switch back to the BSD exec for now.
Bug: http://b/31091962
Change-Id: Ia155c4aa0d6db7b91d7486433c3c01a841b0e509
2016-08-25 17:25:31 -07:00
Elliott Hughes
e1d792b10c Merge "Fix execvpe ENOEXEC behavior." 2016-08-25 16:18:24 +00:00
Elliott Hughes
3c1159024c Fix execvpe ENOEXEC behavior.
The special case for absolute paths wasn't handling ENOEXEC.

Also add more extensive tests for execvpe.

Also switch to manually doing the fork in ExecTestHelper::Run because
ASSERT_EXIT doesn't actually return, meaning we were only running the
first part of each test.

Bug: http://b/31073104
Change-Id: I7a4640afc6d290c51ba2e66fc1b9bb6b0fc174f7
2016-08-24 22:56:52 -07:00
Treehugger Robot
fac56897f8 Merge "Rewrite the exec family." 2016-08-24 21:21:43 +00:00
Elliott Hughes
1b40aafe3f Rewrite the exec family.
* Removes duplication.
* Removes fixed PATH_MAX limit.
* Adds basic tests.

Bug: http://b/30032507
Change-Id: I4087a9de3e53884ac3297ebafbec4e6f8a9871b6
2016-08-24 13:03:04 -07:00