Commit graph

8669 commits

Author SHA1 Message Date
Sandeep Patil
9b1ca569db libc: Add support to allow library calls to find appropriate shell executable for a process
Library calls like system() and popen() invoke the shell executable
pointed to by '_PATH_BSHELL' in order to run the command passed into the
function. The _PATH_BSHELL points to /system/bin/sh by default and thus
breaks any vendor process trying to use system() / popen(), as they are
denied access to system shell by selinux.

This CL make necessary changes, so the implmentations of system() and popen()
can use the appropriate shell (e.g. /vendor/bin/sh for processes running
out of /vendor partition). Also, changes the implementation of system()
and popen().

Bug: 64832610
Test: Manual, Using a test program running from /system/bin and
      /vendor/bin to ensure correct shell is being used.

Change-Id: Ie7168d69decb1ae98284446ae7db34dec930dc33
Merged-In: Ie7168d69decb1ae98284446ae7db34dec930dc33
Signed-off-by: Sandeep Patil <sspatil@google.com>
(cherry picked from commit aa3e32422c)
2017-08-22 10:17:28 -07:00
Elliott Hughes
8440dc736d Merge "Name function arguments in libc headers for Studio."
am: 611d0de62f

Change-Id: I5c089d77145a0189b6ec52ecad65bdfaa8477fd2
2017-08-22 16:22:54 +00:00
Elliott Hughes
611d0de62f Merge "Name function arguments in libc headers for Studio." 2017-08-22 16:14:26 +00:00
Elliott Hughes
ffde533ed9 Name function arguments in libc headers for Studio.
Final batch of headers...

Bug: http://b/64613623
Test: builds

Change-Id: I86578c7c2df446b210fa1bdda3391b21f340e947
2017-08-21 14:51:59 -07:00
Elliott Hughes
119ef0a320 Merge "Name function arguments in libc headers for Studio."
am: f3b92f1485

Change-Id: I033daf856c6fab5ec41702b36c4d384475de9178
2017-08-19 16:48:21 +00:00
Elliott Hughes
f3b92f1485 Merge "Name function arguments in libc headers for Studio." 2017-08-19 16:42:07 +00:00
George Burgess IV
411814e0a9 Merge "Disable FORTIFY on ASAN builds"
am: 7ac99d3ff6

Change-Id: Ib469956edc364bd0d4af59dc5a79439528bf5efd
2017-08-18 22:58:12 +00:00
Treehugger Robot
7ac99d3ff6 Merge "Disable FORTIFY on ASAN builds" 2017-08-18 22:52:27 +00:00
Elliott Hughes
684c31a267 Name function arguments in libc headers for Studio.
Third batch of headers...

Bug: http://b/64613623
Test: builds
Change-Id: I32d8467a0bd22ba94d76476397f4f7dc51003886
2017-08-18 15:07:41 -07:00
George Burgess IV
d9551db089 Disable FORTIFY on ASAN builds
FORTIFY's *_chk functions mess with ASAN's library function
interceptors, which can apparently result in false-positives.

Since adding even more complexity to every run-time check condition in
FORTIFY doesn't seem like a great idea, and the majority of our builds
will still use FORTIFY anyway, turning FORTIFY off here seems
reasonable.

Bug: 63104159
Test: checkbuild on internal master + CtsBionicTestCases. No new
failures.

Change-Id: Id32e551e28ee70a9815ad140c3253b86f03de63f
2017-08-18 13:33:45 -07:00
Tom Cherry
55d0f16369 Merge "Always use CLOCK_MONOTONIC for pthreads and semaphores"
am: cbb09bcbb1

Change-Id: Ic0192542c3f4de8afc4cdc4719c2db1e59bcfc4b
2017-08-18 20:06:28 +00:00
Tom Cherry
cbb09bcbb1 Merge "Always use CLOCK_MONOTONIC for pthreads and semaphores" 2017-08-18 19:59:26 +00:00
Tom Cherry
ac49cedc7e Always use CLOCK_MONOTONIC for pthreads and semaphores
pthread's and semaphore's default behavior is to use CLOCK_REALTIME,
however this behavior is essentially never intended, as that clock is
prone to change discontinuously.

What users really intend is to use CLOCK_MONOTONIC, however only
pthread_cond_timedwait() provides this as an option and even there, a
large amount of existing code does not opt into CLOCK_MONOTONIC.

We have seen numerous bugs directly attributable to this difference.
Therefore, we provide this general workaround to always use
CLOCK_MONOTONIC for waiting, regardless of what the input timespec
is.

Specifically this impacts the below APIs:
pthread_mutex_timedlock()
pthread_cond_timedwait()
pthread_rwlock_timedrdlock()
pthread_rwlock_timedwrlock()
sem_timedwait()

Test: boot bullhead, boot sailfish
Test: bionic pthread/semaphore unit tests
Test: check that pthread_cond_timedwait() timeouts are uneffected by
      CLOCK_REALTIME time changes

Bug: 64694413
Bug: 64623895
Bug: 35756266
Bug: 35678943
Change-Id: Ibba98f5d88be1c306d14e9b9366302ecbef6d534
2017-08-18 09:11:05 -07:00
Elliott Hughes
169f883ef1 Merge "Re-submit "Name function arguments in libc headers for Studio.""
am: 096fa4497c

Change-Id: I402df5b9c5dd3cdbe247db7e25c6baecf57ef2dc
2017-08-18 15:40:53 +00:00
Treehugger Robot
096fa4497c Merge "Re-submit "Name function arguments in libc headers for Studio."" 2017-08-18 15:34:55 +00:00
Elliott Hughes
ff26a16c1d Re-submit "Name function arguments in libc headers for Studio."
This reverts commit 9af9120091 (a revert
of 079bff4fa5), now the versioner bug is
fixed.

Bug: http://b/64613623 # header bug
Bug: http://b/64802958 # versioner bug
Change-Id: I1cb9d7832d4b3aecdc57a9285e2291443e59d02d
2017-08-18 00:00:38 +00:00
Colin Cross
c9ca3ddbaf Merge "Revert "Name function arguments in libc headers for Studio.""
am: cf3b0c183d

Change-Id: I5877c029c8a7125c94456dc09c72e23c6b1d8af0
2017-08-17 18:35:56 +00:00
Colin Cross
cf3b0c183d Merge "Revert "Name function arguments in libc headers for Studio."" 2017-08-17 18:30:57 +00:00
Colin Cross
9af9120091 Revert "Name function arguments in libc headers for Studio."
This reverts commit 079bff4fa5.

Broke builds with SANITIZE_HOST=address with an asan failure in versioner.

Change-Id: I22b113fd5405589d1a25e5e137c450aaba1ade5f
2017-08-17 18:29:54 +00:00
Elliott Hughes
060e6f57e2 Merge "Name function arguments in libc headers for Studio."
am: 84669837f7

Change-Id: I2a3f9aad107f92f6dbc6cc0df229b8f9503ee5d0
2017-08-17 14:53:09 +00:00
Elliott Hughes
84669837f7 Merge "Name function arguments in libc headers for Studio." 2017-08-17 14:47:05 +00:00
Elliott Hughes
1472dbb0cf Merge "Improve debug malloc docs slightly for app developers."
am: a3d3e8e148

Change-Id: I364551c1b05666eb8828cbac55b64127dd664794
2017-08-17 14:46:38 +00:00
Elliott Hughes
a3d3e8e148 Merge "Improve debug malloc docs slightly for app developers." 2017-08-17 14:43:06 +00:00
Isaac Chen
a3d7c4f0b2 Merge "Build support for 32-bit armv8-a"
am: b890336756

Change-Id: Ic985dba02870526bc38187d2ff28d868b8163adc
2017-08-17 07:27:09 +00:00
Isaac Chen
b890336756 Merge "Build support for 32-bit armv8-a" 2017-08-17 07:19:33 +00:00
Evgenii Stepanov
62adbbf5e8 Merge changes from topic "cfi-shadow-size"
am: fc89237b77

Change-Id: I34c706c542e338616d07035e5209d727a43c69bb
2017-08-17 00:37:59 +00:00
Treehugger Robot
fc89237b77 Merge changes from topic "cfi-shadow-size"
* changes:
  Revert "Revert "arm64: expand CFI shadow to cover 48-bit virtual addresses""
  [cfi] Export __cfi_shadow_size.
2017-08-17 00:16:56 +00:00
Elliott Hughes
079bff4fa5 Name function arguments in libc headers for Studio.
Second batch of headers...

Bug: http://b/64613623
Test: builds
Change-Id: I8eef043dbf32afee8ff814e9d005f46aee8fa21f
2017-08-16 16:30:54 -07:00
George Burgess IV
d9dddc34be Merge "Enable FORTIFY in unoptimized builds"
am: 67e7bf137e

Change-Id: Ifc5bde6056467f207565c20f5610ce46470c9f38
2017-08-16 20:55:49 +00:00
Dan Albert
a9aa2ccbfd Merge "Add guards for things the versioner can't catch."
am: 82f28565ce

Change-Id: I5c84c2250fe0c37d8cc8a8a86a4bf0f7baaaf353
2017-08-16 20:55:30 +00:00
Treehugger Robot
67e7bf137e Merge "Enable FORTIFY in unoptimized builds" 2017-08-16 20:43:54 +00:00
Treehugger Robot
82f28565ce Merge "Add guards for things the versioner can't catch." 2017-08-16 20:42:07 +00:00
Dimitry Ivanov
a86d68dcd2 Merge "Report correct errno on clone failure"
am: b2688f4a2a

Change-Id: I7ea8aae468320c16665729a3a925dc921ea35726
2017-08-16 11:27:21 +00:00
Dimitry Ivanov
b2688f4a2a Merge "Report correct errno on clone failure" 2017-08-16 11:22:26 +00:00
Elliott Hughes
644275abe0 Improve debug malloc docs slightly for app developers.
Bug: http://b/63098430
Test: N/A
Change-Id: Icde92f5e8b01b5f918cbfdc470b947bd56bb35c6
2017-08-15 23:17:35 -07:00
George Burgess IV
1de2e358ca Enable FORTIFY in unoptimized builds
GCC's FORTIFY required optimizations to be enabled in order to function
properly. Clang's FORTIFY doesn't have this limitation, so it seems
pointless to keep it disabled due to a GCC-specific limitation.

Bug: 12231437
Test: Checkbuild on bullhead internal master + CtsBionicTestCases. No
new failures.

Change-Id: I74aa35f9d3f3d2a6b11a7adfe72a787e3d7f7f36
2017-08-15 21:20:09 -07:00
Dan Albert
3f7e65e66e Add guards for things the versioner can't catch.
The versioner doesn't handle C++ blocks yet, so these guards won't be
added and it will appear as though the functions are always available
in C++, but based on API level in C.

Test: make checkbuild
Bug: https://github.com/android-ndk/ndk/issues/440
Change-Id: I31a20fa1596d836b280ffc6d7feb863afccca6c7
2017-08-15 14:42:31 -07:00
Elliott Hughes
f43e6a41cd Merge "Name function arguments in libc headers for Studio."
am: 3ce8834e53

Change-Id: I1452bc760374d4e3e5535258d2fb3f659b09842c
2017-08-15 20:39:48 +00:00
Elliott Hughes
3ce8834e53 Merge "Name function arguments in libc headers for Studio." 2017-08-15 20:30:28 +00:00
George Burgess IV
87fcfefe26 Merge "libc fortify: error on realpath(NULL, foo)"
am: 6beab08440

Change-Id: I50cf25955d28df10661e08579fac001f7abdab5f
2017-08-15 17:45:01 +00:00
George Burgess IV
95bd4884b5 libc fortify: error on realpath(NULL, foo)
I've half a mind to make this a warning instead, since this sort of
call isn't UB. That said:
- if the user really wants this (I can't imagine why they would), they
  can just put NULL in a non-const variable,
- we're slowly moving to -Werror ~everywhere anyway, and
- it's presumably easier to change this from an error to a warning than
  the other way around

Bug: 12231437
Test: m checkbuild on bullhead internal master. No new
CtsBionicTestCases failures.

Change-Id: Ie8bf5a3455f663686fda4a7450fb35d147fa745e
2017-08-14 14:48:55 -07:00
dimitry
6de60874aa Report correct errno on clone failure
Test: make
Change-Id: Id0af3678627c06167a6d434d8616c4a304e1fbc0
2017-08-14 14:42:19 +02:00
Isaac Chen
d544fb7da0 Build support for 32-bit armv8-a
The assembly in arm's generic strlen implementation contains deprecated
instruction sequence:
    it      eq  ; start of IT block
    ldreq   ... ; 32-bit T32 insruction in IT block deprecated in armv8
This will cause compiler error because of -Winline-asm and -Werror.

The fix here is to change the sequence:
    it      eq
    ldreq   ...
    bne     1f
to equivalent sequence:
    bne     1f
    ldr     ...
The resulted sequence is (1 instruction) shorter.

See ARM for ARMv8 for details:
F6.2 Partial Deprecation of IT
... All uses of IT that apply to instructions other than a single
subsequent 16-bit instruction from a restricted set are deprecated, ...

Bug: 62895439
Test: "bionic-unit-tests-static --gtest_filter=*strlen*" on Nexus 4
      (krait), emulator (armv7), and sailfish (armv8).
      The test binary for the first 2 is built with armv7-a as its
      TARGET_CPU_ARCH; The test binary for the last is built with
      armv8-a as its TARGET_2ND_CPU_ARCH.
      TARGET(_2ND)_CPU_VARIANTs of both binaries are set to "generic".

Change-Id: Ia2208b4e2ba2cad589975bc7b4617688cbb8826a
2017-08-14 06:05:20 +00:00
Elliott Hughes
faa74342e3 Name function arguments in libc headers for Studio.
First batch of headers...

Bug: http://b/64613623
Test: builds
Change-Id: I6bc3ad79daa635456b61d03b1f43f06c433ec596
2017-08-11 17:45:59 -07:00
Dimitry Ivanov
8ba9c534e6 Merge "Fix pattern to account for '_' prefix in syscalls"
am: cf764c05e4

Change-Id: I2175ac929b30b42e2208e339d1bac11c18875d79
2017-08-10 15:12:18 +00:00
dimitry
daebd05739 Fix pattern to account for '_' prefix in syscalls
Bug: http://b/64549471
Test: make
Change-Id: I7ba856a2cad29adbb028f150aeaabb9894e84d6e
2017-08-10 11:11:00 +02:00
Dan Albert
fda7562aa3 Merge "Put back the _Exit rename for pre-L."
am: 0cd32c1aba

Change-Id: I9d0654a024ccf752be80bb28820fb245973458a3
2017-08-10 00:03:38 +00:00
Treehugger Robot
0cd32c1aba Merge "Put back the _Exit rename for pre-L." 2017-08-09 23:44:41 +00:00
Elliott Hughes
45e8d1d898 Merge "Remove reference to non-existent __LP32__."
am: 8aa387fbee

Change-Id: I9acb4bf22ed7e60deb356a7bda61ec97787a91c7
2017-08-07 23:18:03 +00:00
Elliott Hughes
8aa387fbee Merge "Remove reference to non-existent __LP32__." 2017-08-07 23:09:42 +00:00
Dan Albert
cd8828c346 Put back the _Exit rename for pre-L.
Somehow I accidentally removed this in
https://android-review.googlesource.com/c/445150.

Test: make checkbuild
Bug: None
Change-Id: Ia6744af6c7b6dc2f149e9eab6e1f39863f96f6ca
2017-08-07 14:47:00 -07:00
Elliott Hughes
0138c46794 Remove reference to non-existent __LP32__.
Since there is no 64-bit before 21, there's no need for us to talk about
bitness at all.

Bug: https://github.com/android-ndk/ndk/issues/481
Test: builds
Change-Id: I307466997df35d7f1d0eef7dc7cb35ac3033d25d
2017-08-07 09:04:08 -07:00
Elliott Hughes
212ea2b74e Merge "With O_TMPFILE, open(2) takes a mode argument."
am: 2fdefadcee

Change-Id: I5cd1f9103b4b5f20f18fd3f7f5be2511e2b1990f
2017-08-04 20:20:38 +00:00
Elliott Hughes
10d21d2e26 Merge "Some <syslog.h> fixes."
am: a0ad52b953

Change-Id: I13ac79a4069a231393c6fe67b46a993c6a5a179c
2017-08-04 20:20:24 +00:00
Elliott Hughes
2fdefadcee Merge "With O_TMPFILE, open(2) takes a mode argument." 2017-08-04 20:12:18 +00:00
Elliott Hughes
a0ad52b953 Merge "Some <syslog.h> fixes." 2017-08-04 20:11:41 +00:00
Elliott Hughes
b115aefbb3 With O_TMPFILE, open(2) takes a mode argument.
Strictly, the mode isn't really meaningful unless you supply O_EXCL,
but the kernel will take it and fstat will return it even if you
never give the file a name.

Also warn for O_TMPFILE without a mode at compile time where possible.

Bug: N/A
Test: ran tests
Change-Id: I729b6d6e6190676fd017a1190b6200bf9abdbfd8
2017-08-04 10:20:18 -07:00
George Burgess IV
afaabfe5ea Merge "libc fortify: warn on open() with useless mode bits"
am: cc3639b3ee

Change-Id: I8df1df02ef729eb79af4030c43b508ec79858def
2017-08-04 07:43:36 +00:00
Treehugger Robot
cc3639b3ee Merge "libc fortify: warn on open() with useless mode bits" 2017-08-04 07:32:27 +00:00
George Burgess IV
4e37d53f29 libc fortify: warn on open() with useless mode bits
Bug: 64132680
Test: checkbuild on bullhead internal master; no new CtsBionicTestCases
fail.

Change-Id: I98762bbee0ecdd7b4ffc21135992f2eed320317f
2017-08-03 22:04:19 -07:00
Elliott Hughes
f517288924 Some <syslog.h> fixes.
This whole file is bogus, but if we're going to have it, we may as well
make an effort. Add LOG_NFACILITIES. Also stop using octal like it's 1970,
and so I can have some confidence that these constants are actually right.

Bug: N/A
Test: built inetutils with a modified standalone toolchain
Change-Id: Ifd6f661f87845bcc5843d68474cb836afb698058
2017-08-03 14:44:13 -07:00
Dan Albert
bf16d953d4 Merge "Fix dprintf/vdprintf fallbacks for GCC."
am: 488c961ecc

Change-Id: Iabfabf44d2ec8b2fbde2c64d07f24b8d170d291c
2017-08-03 21:14:52 +00:00
Evgenii Stepanov
abb163f5f0 Revert "Revert "arm64: expand CFI shadow to cover 48-bit virtual addresses""
This reverts commit ea3df0c52b, and
increases the address limit on non-aarch64 64-bit platforms as well.

RLIMIT_AS problem fixed in a different commit.

Bug: 63141434, 64293803
Test: device boots
Change-Id: I1284c4196cc1f0c9d97c3ced97a19de328050d21
2017-08-03 14:11:28 -07:00
Christopher Ferris
74828960bd Merge "Revert "Revert "Move back to the previous version of ion.h."""
am: 5dde3e4d6b

Change-Id: I203b74be269e45bb58f28aa8ab64e73d7f692644
2017-08-03 19:04:42 +00:00
Christopher Ferris
5dde3e4d6b Merge "Revert "Revert "Move back to the previous version of ion.h.""" 2017-08-03 18:56:29 +00:00
Christopher Ferris
02ce96835b Revert "Revert "Move back to the previous version of ion.h.""
This reverts commit 89d6c321f8.

Reason for revert: Still a bunch of branches/builds depending on this incorrectly.

Change-Id: I8de678848b0e5445837c02c0942f7388d27dbfd7
2017-08-03 18:55:45 +00:00
Dan Albert
3aa9bf39cb Fix dprintf/vdprintf fallbacks for GCC.
The ordering of __attribute__ and __asm__ matters for GCC.

Test: `#include <stdio.h>` with gcc
Bug: https://github.com/android-ndk/ndk/issues/72
Change-Id: I20bcd7cac2f96d220746e389f0ca467dc95c37c2
2017-08-03 11:11:23 -07:00
Christopher Ferris
59e8910b17 Merge "Revert "Move back to the previous version of ion.h.""
am: bb36e9fae1

Change-Id: Ic5db38d124df8047aede00c9053a5031812fc6c5
2017-08-03 17:29:35 +00:00
Christopher Ferris
bb36e9fae1 Merge "Revert "Move back to the previous version of ion.h."" 2017-08-03 17:19:25 +00:00
George Burgess IV
5869bbe1d0 Merge "libc fortify: make string.h use diagnose_if"
am: b1b125ead1

Change-Id: I9e4508c73a83987bbd21550538ff77d6cb65cace
2017-08-03 03:29:34 +00:00
Treehugger Robot
b1b125ead1 Merge "libc fortify: make string.h use diagnose_if" 2017-08-03 03:18:44 +00:00
Elliott Hughes
bc6d5e9288 Merge "Add some <sched.h> tests."
am: 26c59f7082

Change-Id: I5423c0d614e7fee238f0f2980956878111604efe
2017-08-02 19:43:58 +00:00
Elliott Hughes
26c59f7082 Merge "Add some <sched.h> tests." 2017-08-02 19:28:38 +00:00
Elliott Hughes
2950f13eef Add some <sched.h> tests.
I was intending to change our behavior to match POSIX, but reality convinced
me otherwise.

Also add missing argument names to the header file on the assumption they'll
be shown in Studio one day.

Bug: http://b/26203902
Test: ran tests
Change-Id: I2aaea48a88d408a32925033fc8f17448fb63252e
2017-08-02 09:01:42 -07:00
Elliott Hughes
8f2608aba9 Merge "Finish <stdio_ext.h>."
am: 316a44f33c

Change-Id: I5ec959f2a1f4090ca3852c2ec453759e5676d93c
2017-08-02 15:09:50 +00:00
Elliott Hughes
316a44f33c Merge "Finish <stdio_ext.h>." 2017-08-02 15:00:38 +00:00
George Burgess IV
96eb6cbf9a Merge "libc fortify: make fcntl.h use diagnose_if"
am: 5ac5a7c083

Change-Id: I2db3f6d42cbb07c703f142665fd2a0c5059f78bc
2017-08-02 08:12:28 +00:00
Treehugger Robot
5ac5a7c083 Merge "libc fortify: make fcntl.h use diagnose_if" 2017-08-02 08:06:20 +00:00
George Burgess IV
1ede4abc4a Merge "libc fortify: make socket.h and stdlib.h use diagnose_if"
am: a821283d22

Change-Id: I818da183356943d72e96d1e2264747de6fe6a066
2017-08-02 07:43:56 +00:00
Treehugger Robot
a821283d22 Merge "libc fortify: make socket.h and stdlib.h use diagnose_if" 2017-08-02 07:37:46 +00:00
George Burgess IV
ced73cda27 Merge "libc fortify: make stdio.h use diagnose_if"
am: 6e0de9da49

Change-Id: Ic847d12c7822f7f8e25ec5a40e6cf7143417dad9
2017-08-02 07:33:55 +00:00
Treehugger Robot
6e0de9da49 Merge "libc fortify: make stdio.h use diagnose_if" 2017-08-02 07:27:23 +00:00
George Burgess IV
f5b6f13394 Merge "libc fortify: make poll.h and stat.h use diagnose_if"
am: cff14d9e3e

Change-Id: I4cd2863d8f9d859e8441da7cc54f2fc15294b42e
2017-08-02 06:50:53 +00:00
Treehugger Robot
cff14d9e3e Merge "libc fortify: make poll.h and stat.h use diagnose_if" 2017-08-02 06:44:41 +00:00
George Burgess IV
b6300463a8 libc fortify: make string.h use diagnose_if
This also has a handful of style fixups, to make this file more
consistent. And removes __bionic_zero_size_is_okay_t, since there's a
better workaround available.

Bug: 12231437
Test: m checkbuild on bionic internal master; CtsBionicTestCases show
no new failures.

Change-Id: I75a020630dbab0ce828563502900cba14ae992d1
2017-08-01 22:41:11 -07:00
George Burgess IV
54f5d8331f libc fortify: make socket.h and stdlib.h use diagnose_if
Since realpath no longer needs to be overloaded, we can restore the
upstream source to purity. We'll be able to do this with most of the
other functions when we pull a newer clang in.

Bug: 12231437
Test: m checkbuild on bionic internal master; CtsBionicTestCases show
no new failures.

Change-Id: I484221bba0b291273fece23d2be2f5f9fd713d2c
2017-08-01 22:32:15 -07:00
George Burgess IV
23dbf82132 libc fortify: make stdio.h use diagnose_if
This also throws in some reformatting to match the GCC FORTIFY style in
this file (e.g. 4 space standard indent).

Per b/36984245, some function protos are unwrapped beyond 100 chars, as
well.

Bug: 12231437
Test: m checkbuild on bionic internal master; CtsBionicTestCases show
no new failures.

Change-Id: I6dce60ec14d5cd703d9e724699634a197ca11023
2017-08-01 22:02:31 -07:00
George Burgess IV
52dde5fb1c libc fortify: make poll.h and stat.h use diagnose_if
Bug: 12231437
Test: m checkbuild on bionic internal master; CtsBionicTestCases show
no new failures.

Change-Id: I7dbdeca12c46d1ee3804f13546b11c3f3b3a7596
2017-08-01 21:32:12 -07:00
George Burgess IV
0df4c3787d libc fortify: make fcntl.h use diagnose_if
Bug: 12231437
Test: m checkbuild on bionic internal master; CtsBionicTestCases show
no new failures.

Change-Id: I4a31d9e65ed5820a581261a7e8f63a83e44936c3
2017-08-01 19:55:02 -07:00
Dan Albert
f781e14912 Merge "Mark new/delete as weak in the NDK stubs."
am: aa8f766bf0

Change-Id: I1033bc0a963dd03476a77c0a54915b9c4353a5aa
2017-08-01 23:19:17 +00:00
George Burgess IV
a28402b431 Merge "libc fortify: make unistd.h use diagnose_if"
am: 0ec52ce15b

Change-Id: I1361011fc3f466f681d651f85e8e828228c77b41
2017-08-01 23:18:59 +00:00
Treehugger Robot
aa8f766bf0 Merge "Mark new/delete as weak in the NDK stubs." 2017-08-01 23:11:12 +00:00
Treehugger Robot
0ec52ce15b Merge "libc fortify: make unistd.h use diagnose_if" 2017-08-01 23:06:09 +00:00
Elliott Hughes
0fa654aef5 Merge "Remove nullability specifications."
am: fe3d58f49f

Change-Id: Id4fff7a1ba3f1ed76ae77ec42fdd0ca664dceeff
2017-08-01 22:57:26 +00:00
Elliott Hughes
5ba2c21159 Finish <stdio_ext.h>.
Implement __freading and __fwriting, and clarify the documentation that was
the cause of these not being implemented for years.

Bug: http://b/17157253
Test: ran tests
Change-Id: I89542c8131b13889e2585417a024050ecf2abcb7
2017-08-01 15:27:27 -07:00
George Burgess IV
16c173935f libc fortify: make unistd.h use diagnose_if
Also:
- remove a NULL check. The bug that's been working around has been
  fixed since clang r298431, and our compiler is built from r300080, and
- unwrap some function prototypes, per b/36984245.

If you're interested, here's what a new error versus an old one looks
like: https://drive.google.com/file/d/0B-8OBPboNJ_4MVdlYXdJbUFBYUk/view

Bug: 12231437
Test: m checkbuild on bullhead internal master; CtsBionicTestCases show
no new failures.

Change-Id: Ibafe61198988b4c8bee8391bcdf01bcbc04233de
2017-08-01 20:55:30 +00:00
Elliott Hughes
3f66e74b90 Remove nullability specifications.
Bug: http://b/64251432
Test: builds
Change-Id: I5b1613484783f7478d30b5e694007f77fa626659
2017-08-01 13:24:40 -07:00
Elliott Hughes
d02c95a2ca Merge "Consistently say va_arg rather than __va_arg."
am: 3e523a6562

Change-Id: I3a01c16fdf736a5df9b9be4a6ba58706aadb9f6d
2017-08-01 20:01:13 +00:00
Treehugger Robot
3e523a6562 Merge "Consistently say va_arg rather than __va_arg." 2017-08-01 19:51:32 +00:00
Christopher Ferris
89d6c321f8 Revert "Move back to the previous version of ion.h."
This reverts commit 1a0344d65d.

Reason for revert: Fixed the original problem.

Change-Id: Ibf4ba05160048a3216e0cc49cc88519f73d00fa4
2017-08-01 19:32:14 +00:00