Commit graph

18812 commits

Author SHA1 Message Date
Elliott Hughes
89e29ee485 Fix mbsnrtowcs where dst is null.
POSIX is its usual unintelligible self
(http://pubs.opengroup.org/onlinepubs/9699919799/functions/mbsrtowcs.html),
but the ISO C11 standard (7.29.6.4.1 paragraph 2) is pretty clear: *src
should change if and only if dst is non-null.

Bug: https://code.google.com/p/android/issues/detail?id=166381
Test: bionic tests
Change-Id: Ibc631cfa5b1bf4a6f56963feba9f0eea27b07984
2016-09-29 17:26:13 -07:00
Christopher Ferris
cc9e9933e1 Merge "Update documentation." 2016-09-29 17:28:39 +00:00
Elliott Hughes
6a5f7f5873 Merge "Rename __pure, __pure2, and __purefunc." 2016-09-29 15:49:08 +00:00
Christopher Ferris
ac66d16a52 Update documentation.
Fix the incorrect mention of when the zygote flag is set on a size.

Add information about how to use am dumpheap -n to dump the native
heap to a file.

Test: Documentation only change.

Change-Id: I82e810ee7ffffcf7506fb6fd9bcfdfb0465a48be
2016-09-28 14:54:06 -07:00
Elliott Hughes
95fa061678 Rename __pure, __pure2, and __purefunc.
These names were pretty misleading (aka "backwards"), so switch to the
same obvious names glibc uses.

Test: build.
Change-Id: Ia98c9dbbccd0820386116562347654e84669034a
2016-09-28 12:36:38 -07:00
Josh Gao
1d20532f5c Merge changes Idcbc544e,Ic7cfad1c
* changes:
  Fix warnings (and errors) in static inline headers.
  Add versioner to preupload hook.
2016-09-26 21:53:01 +00:00
Treehugger Robot
424a5f629c Merge "Fix complex.csqrtf test and add a trivial sincosl test." 2016-09-26 18:34:55 +00:00
Elliott Hughes
e9719f3fb5 Fix complex.csqrtf test and add a trivial sincosl test.
sincos and sincosf are being tested more thoroughly with a table of data,
but there's nothing equivalent for sincosl.

Test: ran the tests, obviously.
Change-Id: I5b4b22b73cad9b0030549de2e2ed2a0e38648806
2016-09-26 09:35:04 -07:00
Josh Gao
6cd9fb080c Fix warnings (and errors) in static inline headers.
Bug: http://b/31676510
Change-Id: Idcbc544e498f7e6bbe99c2bf7dc557a5681e96c4
Test: preupload hook
2016-09-23 14:34:03 -07:00
Josh Gao
0173379610 Add versioner to preupload hook.
Bug: http://b/31676510
Change-Id: Ic7cfad1cb214c9f711a985bace484a20db1a89b6
Test: submitted this patch, and it failed
2016-09-23 14:34:03 -07:00
Treehugger Robot
0855431067 Merge changes Ic43d690d,Ifec6c320
* changes:
  Add legacy inlines for locale aware APIs.
  Add strtof_l and strtod_l.
2016-09-22 16:28:15 +00:00
Dan Albert
6576a3749b Add legacy inlines for locale aware APIs.
Test: make checkbuild tests
Bug: http://b/31639993
Change-Id: Ic43d690dff3c6960d7826bd0b064640a3ea0e883
2016-09-22 00:44:37 -07:00
Dan Albert
3103f6d39e Add strtof_l and strtod_l.
libc++ needs these now. Add shims to match the others.

Test: make checkbuild tests
Bug: http://b/31639993
Change-Id: Ifec6c32099145d8d3d1a5639a4809e5e9f553c33
2016-09-22 00:44:37 -07:00
Nick Desaulniers
904460f749 Merge "bionic: tests: add test for fallocate FALLOC_FL_PUNCH_HOLE" 2016-09-21 22:30:31 +00:00
Elliott Hughes
53ad33b993 Merge "Remove remaining big-endian cruft." 2016-09-21 21:48:24 +00:00
Elliott Hughes
c351cbd7c0 Merge "Remove _KERNEL references from <machine/elf_machdep.h>." 2016-09-21 21:48:15 +00:00
Nick Desaulniers
09d900d50f bionic: tests: add test for fallocate FALLOC_FL_PUNCH_HOLE
Bug: 28760453
Change-Id: I1a58d19bf45eac5f930b0f649cf9b8c9046302f3
2016-09-21 09:24:50 -07:00
Treehugger Robot
d263fe5d13 Merge "Match _Nonnull between char and wchar_t funcs." 2016-09-21 15:39:33 +00:00
Treehugger Robot
01b70ac552 Merge "Add __ANDROID_API_FUTURE__." 2016-09-21 15:29:52 +00:00
Dan Albert
f45d76a85b Match _Nonnull between char and wchar_t funcs.
The char versions of these functions have `_Nonnull` on these
parameters. Match it in the wide char versions. strxfrm_l also has
`__restrict` on its pointer arguments, I believe we've decided that's
something that shouldn't be proliferated...

Test: make checkbuild tests
Bug: None
Change-Id: Ie533e1af92b2a7c9df657073dbc4c345abf72473
2016-09-21 02:00:18 -07:00
Dan Albert
495ec92605 Add __ANDROID_API_FUTURE__.
Needed for checking conditions like `__ANDROID_API__ <
__ANDROID_API_FUTURE__` for providing inlines for things that have
not yet been included in any release.

Test: make checkbuild tests
Bug: None
Change-Id: Ibcddac5a538ede020a8cb65fca03194475121966
2016-09-21 01:08:44 -07:00
Elliott Hughes
42743f1e9e Merge "Fix some easy cases of __ANDROID__ versus __BIONIC__." 2016-09-17 16:40:59 +00:00
Elliott Hughes
497127711a Remove remaining big-endian cruft.
We'd removed most of it already, but a few bits and pieces were still lying
around.

Change-Id: I572a23eb15b9670d8d0f95586eca99ab0bdb4a1b
Test: mm.
2016-09-16 18:53:34 -07:00
Elliott Hughes
63da3dfb70 Remove _KERNEL references from <machine/elf_machdep.h>.
Test: mm.
Change-Id: I9dff708dd05d4f9e52ccdfde96e096553c873054
2016-09-16 18:46:53 -07:00
Elliott Hughes
a9209d7a0e Fix some easy cases of __ANDROID__ versus __BIONIC__.
We need to make a clearer distinction for bionic on the host. This patch
doesn't fully address things like "should host bionic try to talk to netd?"
for now, but is a step in the right direction.

Bug: http://b/31559095
Test: bionic tests.
Change-Id: I49812f8b75d9d78c4fd8a8ddf5df1201d63771d6
2016-09-16 18:27:07 -07:00
Treehugger Robot
9d4d60b480 Merge "Make static library for loader tests" 2016-09-16 16:14:48 +00:00
Treehugger Robot
847fd9b315 Merge changes Iada279ee,Ic6089895,Ie2241b19,Ib0610707
* changes:
  versioner: turn on -Wundef.
  Fix BYTE_ORDER check in <netinet/ip6.h>.
  Fix instances of '#if __i386__'.
  Fix instances of '#if __LP64__'.
2016-09-15 23:40:12 +00:00
Dimitry Ivanov
c462c28afe Make static library for loader tests
1. Extract bionic loader tests to static library in
order to link it to bionic cts tests.
2. Make libpagemap dependency static to reduce dependencies
on internal native libraries.

Bug: http://b/22182538
Test: run bionic-unit-tests --gtest_filter=dl*:Dl*
Change-Id: I5decd5893e6338c84b3ab23e1d65d70bd75ad880
2016-09-15 16:25:31 -07:00
Josh Gao
ac3e564142 versioner: turn on -Wundef.
Poking around with -Wundef exposed a pretty horrifying bug, so we
should probably keep it turned on.

Bug: http://b/31496165
Change-Id: Iada279eec91ded0d59ff3841d5a3ce1a36e34c3a
2016-09-15 14:21:28 -07:00
Josh Gao
81b4aadb48 Fix BYTE_ORDER check in <netinet/ip6.h>.
Neither BYTE_ORDER nor BIG_ENDIAN were being defined anywhere, so they
were defaulting to zero, leading to BIG_ENDIAN values being used.

Bug: http://b/31496165
Change-Id: Ic6089895f39b86e7762bdb5b7d5b01feb0d2fd17
2016-09-15 14:21:28 -07:00
Josh Gao
cb728e6f63 Fix instances of '#if __i386__'.
Triggers -Wundef, which is on in -Weverything.

Bug: http://b/31496165
Change-Id: Ie2241b19abd6257bebf68baa3ecc4de8066c722e
2016-09-15 14:21:28 -07:00
Josh Gao
b36efa4343 Fix instances of '#if __LP64__'.
Triggers -Wundef, which is on in -Weverything.

Bug: http://b/31496165
Change-Id: Ib06107073f7dd1d584c19c222d0430da9d35630b
2016-09-15 14:21:28 -07:00
Josh Gao
5622837301 Merge "Initialize main thread TLS before the global stack guard." 2016-09-15 19:28:56 +00:00
Kenny Root
b32184eb84 Merge "Fix memory leak in test util" 2016-09-15 19:12:46 +00:00
Treehugger Robot
57a4e8d1fe Merge "Add missing uapi header module." 2016-09-15 05:36:52 +00:00
Treehugger Robot
be454614c2 Merge "Make getpagesize inline static." 2016-09-15 03:34:30 +00:00
Kenny Root
f0cccdbe19 Fix memory leak in test util
This shows up when you're doing make HOST_SANITIZE=address

Test: mmma bionic && out/host/linux-x86/bin/bionic_tests_zipalign (compare before and after)
Change-Id: Ia94790496327f3818d5fdb7b5ad07e14e60bcae1
2016-09-14 17:24:37 -07:00
Dan Albert
bae16ef1bb Add missing uapi header module.
Test: make checkbuild tests
Bug: http://b/30465923
Change-Id: I4000a9f7aa7ede03dfe799cea7c890bd5dcda575
2016-09-14 17:16:33 -07:00
Dan Albert
a39f5d8b95 Make getpagesize inline static.
Needed to avoid multiple definition errors.

Test: make checkbuild tests
Bug: None
Change-Id: Ife83e89f5232e98d363e2b2edd7a353ed61c4836
2016-09-14 17:16:33 -07:00
Josh Gao
db79694bda Merge "versioner: turn on -Wall -Wextra -Werror." 2016-09-15 00:03:40 +00:00
Treehugger Robot
93892add44 Merge "Add modules for NDK headers and libraries." 2016-09-14 22:32:23 +00:00
Josh Gao
bb96628f48 versioner: turn on -Wall -Wextra -Werror.
Change-Id: Ica47d0fa671934a1ea193869265de8986b012a58
Test: mma && versioner
2016-09-14 14:22:27 -07:00
Treehugger Robot
76fcad2a6f Merge "Expose some more function decls." 2016-09-13 23:24:42 +00:00
Treehugger Robot
8c1e2b9e38 Merge "linker: Refactoring step 3 of many" 2016-09-13 22:35:00 +00:00
Dan Albert
4238a35007 Add modules for NDK headers and libraries.
Test: make checkbuild
Bug: http://b/27533932
Change-Id: I285e483ba9fb80cc3baf0d025c85344e5b79a08b
2016-09-13 14:16:14 -07:00
Dan Albert
31d7037f2a Expose some more function decls.
Test: make checkbuild tests # for x86-eng this time
Bug: http://b/30465923
Change-Id: I98c5a8d09463e85ac22b05035c87edab04eaa200
2016-09-13 14:16:14 -07:00
Dimitry Ivanov
3f66057544 linker: Refactoring step 3 of many
Extract linker executable specific code to linker_main.cpp;
this part of code does not have a place in libdl.a/so.

Bug: http://b/14998480
Bug: http://b/30706810
Test: mm && run bionic-unit-tests
Change-Id: I90f7475e93a919b0f9525da22928089ad35b8f6c
2016-09-13 13:38:58 -07:00
Treehugger Robot
0f81dd3548 Merge "Move test libraries under /data/nativetests" 2016-09-09 18:58:34 +00:00
Treehugger Robot
ce4d419f7a Merge "[mips64] Fix ipc syscalls" 2016-09-09 17:19:54 +00:00
Nikola Veljkovic
23f088cd74 [mips64] Fix ipc syscalls
Mips defines CONFIG_ARCH_WANT_IPC_PARSE_VERSION for both 32 and 64-bit.
See arch/mips/Kconfig. Other supported arches do it for 32-bit only.
This translates in having to pass IPC_64 flag for mips32 and mips64.
We use __mips__ to pass the flag, which is also defined for both 32 and
64-bit.

Change fixes bionic smoke tests (sys_msg, sys_sem, sys_shm) for mips64.

Test: bionic-unit-tests --gtest_filter="sys_*.smoke"
Change-Id: I918e4ffafd2002bb3e62ee252406746778100031
2016-09-09 12:24:04 +02:00