Commit graph

1825 commits

Author SHA1 Message Date
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
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
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
0ec52ce15b Merge "libc fortify: make unistd.h use diagnose_if" 2017-08-01 23:06:09 +00: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
84136f4be7 Merge "Clean up some <stdio.h> constants."
am: 7f86f1dd15

Change-Id: I917e76ed6786ce08fac63f887e84c04b20cd02b8
2017-08-01 18:14:00 +00:00
Elliott Hughes
b15feb7024 Clean up some <stdio.h> constants.
And actually test an assertion rather than just state it in a comment.

Bug: N/A
Test: ran tests
Change-Id: I07699483aca4aac4e089d8b99123cb5bde9b3c63
2017-07-31 17:20:18 -07:00
Elliott Hughes
b82a2d0bd5 Merge "POSIX getlogin_r/LOGIN_NAME_MAX/TTY_NAME_MAX."
am: 8aa4bc7c55

Change-Id: I578d3e5c096401b0447f9ed7223d3e20ffb5b19e
2017-07-29 14:59:15 +00:00
Elliott Hughes
8aa4bc7c55 Merge "POSIX getlogin_r/LOGIN_NAME_MAX/TTY_NAME_MAX." 2017-07-29 14:56:02 +00:00
Elliott Hughes
105e768638 Merge "Fix the sysconf _SC_2_VERSION test."
am: 3e183a5d30

Change-Id: I384fc20676715a1385a182428e5bbd17d4e3d8e8
2017-07-29 07:07:47 +00:00
Elliott Hughes
6c135f4c41 Fix the sysconf _SC_2_VERSION test.
Not sure how this ended up broken. Too many branches!

Bug: N/A
Test: ran tests
Change-Id: Ieef1e8170c9aaf139d9e0664475ccb08b8fcdeba
2017-07-28 16:53:32 -07:00
Elliott Hughes
06bd5862b1 POSIX getlogin_r/LOGIN_NAME_MAX/TTY_NAME_MAX.
Bug: N/A
Test: ran tests
Change-Id: I97c8ecc82fb09c3fa4bb5e6f000d46f04f3d1702
2017-07-28 16:34:38 -07:00
Elliott Hughes
a97079d94e Merge "Implement wcwidth(3) in terms of icu4c."
am: bafa1985ec

Change-Id: Ia7e74b6124206fe5f2c5bf372c03ee5246045462
2017-07-28 21:50:26 +00:00
Elliott Hughes
c41b560f5f Implement wcwidth(3) in terms of icu4c.
Based on com.google.i18n.CharWidth by the icu-team folks.

Bug: N/A
Test: ran tests
Change-Id: Ia9d818ec4ae60f2f3978533195330d00699397c5
2017-07-27 17:08:24 -07:00
Elliott Hughes
72f06ce7fe Merge "Use O_APPEND for stdio append mode."
am: 38bcf2b704

Change-Id: I4e1274d93adafffc6c4795cbcb5755735533c4de
2017-07-27 15:42:52 +00:00
Elliott Hughes
33a8cb1d1a Use O_APPEND for stdio append mode.
"Although not explicitly required by this volume of POSIX.1-2008, a good
implementation of append (a) mode would cause the O_APPEND flag to be set."

Yeah, about that...

Bug: N/A
Test: ran tests
Change-Id: I23c4bc5c1ebc92e0cb44025d2d313f321f9ffa68
2017-07-25 18:11:23 -07:00
Elliott Hughes
c5c7bee025 Merge "tests: clean up bionic-unit-tests-static linking"
am: b8115bdf4f

Change-Id: I851293e85617365eacdc0aa811473d5a6ebfbb1d
2017-07-25 15:00:25 +00:00
Elliott Hughes
f32d484ace tests: clean up bionic-unit-tests-static linking
Adding libc++_static explicitly is not needed when it is specified
via stl:, and was the real reason we needed --allow-multiple-definition.

Bug: N/A
Test: ran static tests (32- and 64-bit)
Change-Id: I254a4b8c4f7955a17c970d31b427b05c1a2e0acf
Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
2017-07-24 16:22:17 -07:00
Elliott Hughes
2a731897e5 Merge "Make xfail passes not failures."
am: 4dc80181cd

Change-Id: I38cfd064c28994372d6f39a6f7e1e93a3ee58779
2017-07-24 20:55:11 +00:00
Elliott Hughes
4dc80181cd Merge "Make xfail passes not failures." 2017-07-24 20:51:18 +00:00
Elliott Hughes
59378a9a10 Merge "Replace fmemopen."
am: bff8da308f

Change-Id: I67a84a5bc4d879a51871778fd4cea5646e54c34f
2017-07-24 20:39:09 +00:00
Elliott Hughes
bff8da308f Merge "Replace fmemopen." 2017-07-24 20:36:16 +00:00
Elliott Hughes
f06c96a487 Merge "Apply recent strto* fix, add new tests."
am: 89ff49942b

Change-Id: I8d64ce9ecb21c1171ae43153a767a613877aa2ca
2017-07-24 20:22:52 +00:00
Elliott Hughes
778b1bd7f6 Merge "Replace killpg."
am: 57ad09278f

Change-Id: Ib1902dbe08b5c797278a4425ae8434dcadd7f06b
2017-07-24 20:22:39 +00:00
Elliott Hughes
89ff49942b Merge "Apply recent strto* fix, add new tests." 2017-07-24 20:18:34 +00:00
Elliott Hughes
57ad09278f Merge "Replace killpg." 2017-07-24 20:16:40 +00:00
Elliott Hughes
3a4c45499e Replace fmemopen.
A new implementation starting from the FreeBSD fmemopen rather than the
OpenBSD one we used to use.

The tests were arrived at by translating each sentence in
http://pubs.opengroup.org/onlinepubs/9699919799/functions/fmemopen.html,
plus http://man7.org/linux/man-pages/man3/fmemopen.3.html for historical
GNU bugs.

Bug: http://b/31304889
Test: ran tests
Change-Id: Id8b168c9ecde638e9cdedbc3b8a0982fc83c7048
2017-07-24 10:48:42 -07:00
Elliott Hughes
93a89f84e4 Make xfail passes not failures.
Bug: http://b/63703384
Test: ran tests
Change-Id: I02dfc92cfc0e07831b8f3a974803be384bc02f1e
2017-07-21 18:51:06 -07:00
Elliott Hughes
452c185a0b Merge "Hide various mbstate implementation details."
am: dcdd0e3760

Change-Id: I4f2941939f40c04344f3f9dcfd5debe7780d9275
2017-07-15 03:19:16 +00:00
Elliott Hughes
697f42afdb Hide various mbstate implementation details.
...by inlining them.

Also fix a couple of harmless bugs in passing. I've added tests, but in
both cases I don't think it was actually possible to hit the bad behavior:
we'd hit another test and fail immediately after in an externally
indistinguishable way.

Bug: N/A
Test: readelf
Change-Id: I8466050b0bfe2b7b94c76b383cf10c1d9d28debd
2017-07-14 17:00:05 -07:00
Elliott Hughes
5a99bd4ea7 Merge "Fix unistd._POSIX_macros_smoke test."
am: 03e9c498d4

Change-Id: I751bc797ae578760664b51859c7b9a1711709adb
2017-07-13 19:27:58 +00:00
Elliott Hughes
a35293534f Fix unistd._POSIX_macros_smoke test.
We now claim _POSIX2_VERSION, but the test wasn't updated.

Bug: N/A
Test: ran tests
Change-Id: Idb3369b3df4b964f585597f0d37962ae619322d2
2017-07-13 10:20:41 -07:00
Elliott Hughes
f826a37b95 Apply recent strto* fix, add new tests.
The behavior with "0xy" was wrong: we'd swallow the 'x'.

Bug: N/A
Test: ran tests
Change-Id: I2464d22a2408e99880303876306f18a25c390ad9
2017-07-13 09:35:15 -07:00
Elliott Hughes
7532b32627 Replace killpg.
Upstream's killpg is diverging further from glibc behavior, so let's just fork.

Bug: N/A
Test: ran tests
Change-Id: I70a3543018bc0a5c0bbf019ac527043b90568fda
2017-07-11 15:00:17 -07:00
Pavel Labath
8431285728 Merge "sys_ptrace_test: Better detect missing HW support"
am: fbefc86310

Change-Id: Idd43ea10d7e91353e33ff9efe0531eed64bd1a31
2017-07-11 08:17:17 +00:00
Pavel Labath
95d8fb1e84 sys_ptrace_test: Better detect missing HW support
If the hardware debug support is missing from the CPU, the kernel can
end up in the state where it reports that it supports N(>0) watchpoints,
but the "maximum supported watchpoint size" is zero.

This is not a really sensible API, but it is what we have. I'm going to
speak to folks upstream about whether we can have it report something
more sensible, but that will take a while (if ever).

So, for the time being, detect this situation and treat it as if no
hardware watchtpoints/breakpoints are supported.

Test: bionic-unit-tests --gtest_filter="sys_ptrace.*"
Change-Id: Id6a013c9bec8d8b450b4a36c28431f6b7fd15879
Bug: 63116544
2017-07-10 12:52:35 +00:00
Elliott Hughes
e716af709d Merge "Make <sys/ttydefaults.h> more usable."
am: 1de6d0bb8a

Change-Id: Id12e3e0847f8c114509f9acd4ef3751c889cae18
2017-07-06 22:33:46 +00:00
Elliott Hughes
1de6d0bb8a Merge "Make <sys/ttydefaults.h> more usable." 2017-07-06 22:20:34 +00:00
Elliott Hughes
02fdd0570e Make <sys/ttydefaults.h> more usable.
* TTYDEF_OFLAG referred to the BSD OXTABS constant instead of the Linux XTABS,
  so references to it wouldn't compile.

* CEOL was incorrect (compared to `stty -a`).

* ttydefchars wouldn't compile (removed rather than attempt to fix something
  of unclear utility).

Bug: http://b/63145226
Test: new test
Change-Id: I823e5eaab789cafd2eeea03f77ea553346822f74
2017-07-06 10:33:15 -07:00
Andreas Gampe
6b3a608fc9 Merge "Bionic: Add ziparchive test dependency"
am: 7b7475ce85

Change-Id: I391591c530b2c33ddb8ace15c98f895e52140c5f
2017-07-06 15:00:04 +00:00