Commit graph

27769 commits

Author SHA1 Message Date
Ryan Prichard
db6edcca36 Fix BionicAllocator comment
Test: n/a
Bug: none
Change-Id: Ic437d35231b47553add49e20d7ee451d42db710c
2019-04-01 16:17:59 -07:00
Yi Kong
4699cf6174 Merge "Modernise code to use override specifier" 2019-03-30 02:11:13 +00:00
Daniel Mentz
0ce5c4440d Merge "clean_header: Don't print extraneous newline char" 2019-03-30 00:10:09 +00:00
Daniel Mentz
bb4cf7b8a7 clean_header: Don't print extraneous newline char
Don't print an extraneous newline character at the end of the include
file if clean_header.py is used in the non-update mode. This is
necessary to achieve consistent results in the update and non-update
modes.

Running clean_header in the non-update mode and redirecting the output
to a file should have the same result as using the update mode and have
the script write to the file directly.

Change-Id: I6b176c5365840d66e4499bacd205f1fa77302a2b
2019-03-29 15:17:48 -07:00
Daniel Mentz
b95c8af8c9 Merge "clean_header: Write to correct dst_file" 2019-03-29 21:41:35 +00:00
Daniel Mentz
316f4a499c clean_header: Write to correct dst_file
Write to correct dst_file when in update mode. This enables use cases
like the following:

../../../bionic/libc/kernel/tools/clean_header.py -k original-kernel-headers/ -d kernel-headers/ -u linux/ion.h

Previously, we had to cd into kernel-headers/ and then run

../../../../bionic/libc/kernel/tools/clean_header.py -k ../original-kernel-headers/ -d . -u linux/ion.h

because the tool didn't allow the relative path to be different from the
destination path.

Change-Id: I8c5e284ce7a6737d77a2f5ead3e7e5db01317425
2019-03-29 21:41:15 +00:00
Yi Kong
358603a409 Modernise code to use override specifier
Generated by clang-tidy.

Test: m checkbuild
Change-Id: I8e23da6b8af31b291be2eefe9937ca222ea8a8c3
2019-03-29 14:27:27 -07:00
Pirama Arumuga Nainar
3e742cb613 Merge "Reserve realtime signal for libprofile-extras" 2019-03-29 15:57:32 +00:00
Christopher Ferris
6c5c6afea9 Merge "Fix double initialization call." 2019-03-28 21:49:26 +00:00
Christopher Ferris
1e3758e7a2 Fix double initialization call.
The previous refactor left a double call to the initialization of
the loaded hooks. Remove the unnecessary call.

Bug: 129239269

Test: All unit tests pass. No double printing of init messages.
Change-Id: Ie980f2383c75d69f8b06bf9a431bb59caef21188
2019-03-28 17:12:26 +00:00
Peter Collingbourne
14025fd2bf Merge "Use PR_SET_VMA_ANON_NAME to name the abort message mapping." 2019-03-28 01:17:33 +00:00
Peter Collingbourne
feb5ed1b54 Use PR_SET_VMA_ANON_NAME to name the abort message mapping.
This makes it easier for tools to find the mapping. I am planning
to use this in crashpad to add HWASAN reports to the minidump.

Bug: http://crbug.com/crashpad/287
Change-Id: I600e551ef26d6ff62849319365d77912afa82fde
2019-03-27 16:50:27 -07:00
Nick Kralevich
29a89df9e2 Merge "param.h: whitespace cleanup" 2019-03-27 23:46:09 +00:00
Treehugger Robot
2e824e3150 Merge "tests: test both upper- and lower-case with strptime %P/%p." 2019-03-27 20:54:59 +00:00
Yi Kong
1d9a4cbce9 Merge "Move x86 and x86_64 libc to use libcrt" 2019-03-27 20:32:46 +00:00
Treehugger Robot
e7ee0731c3 Merge "Convert new tests to GTEST_SKIP." 2019-03-27 20:04:49 +00:00
Nick Kralevich
3cfedf4ff0 param.h: whitespace cleanup
c50b6a2b89 redefined the powerof2 macro,
but in a way that that didn't meet the clang_format style guidelines.
Change powerof2 to make clang_format happy.

Test: compiles
Change-Id: Icd04a17f40413b7a416ddcdc080edbc4d3fac87a
2019-03-27 10:56:16 -07:00
Yi Kong
efd25a0fd7 Move x86 and x86_64 libc to use libcrt
With __cpu_model visibility issue fixed in libcrt, we can move x86 and
x86_64 libc to use libcrt as well.

Test: emulator boots
Bug: 122993569
Change-Id: If71c324180010a57e3e9598d758a4d6ab1a3c369
2019-03-27 16:54:28 +00:00
Elliott Hughes
1167882a87 tests: test both upper- and lower-case with strptime %P/%p.
Test: ran tests
Change-Id: I7275808f2f0ae4f02d057542a13350895022910c
2019-03-27 08:56:49 -07:00
Elliott Hughes
109072038a Convert new tests to GTEST_SKIP.
These went in while we were waiting for the infrastructure to catch up.

Test: treehugger
Change-Id: I1179d1aba8f1369d320f82705958b36c6930babf
2019-03-27 08:51:02 -07:00
Elliott Hughes
ff923681be Merge "strptime: support everything that strftime supports." 2019-03-27 15:44:54 +00:00
Elliott Hughes
a1fb15bb67 strptime: support everything that strftime supports.
Our strptime was missing `%F`, `%G`, `%g`, `%P`, `%u`, `%V`, and
`%v`. Most of these are already supported upstream (and I've just pulled
their current implementation), but some aren't. We're horribly out of
sync anyway, so I'll upstream the missing pieces and then try to get us
back in sync later.

Test: new tests, but originally found by toybox trying to use %F
Change-Id: Ib1a10801a7a3b9c9189440c3b300109bde535fd9
2019-03-26 19:07:40 -07:00
Elliott Hughes
e08288465e Merge "bionic tests: use GTEST_SKIP." 2019-03-27 02:05:57 +00:00
Christopher Ferris
e990078f05 Merge "Increase the allocation limit again." 2019-03-27 01:04:36 +00:00
Treehugger Robot
b0c33ecb99 Merge "Fix running the tests on the host again." 2019-03-26 23:44:19 +00:00
Christopher Ferris
ce491abe24 Increase the allocation limit again.
Still getting a few flakes, so double the allowed tries.

Bug: 128872105

Test: Test passes.
Change-Id: I0fb3d74655eaece6660dec26a2a1d01430ef8fbc
2019-03-26 15:47:07 -07:00
Treehugger Robot
fe88d26aca Merge "Typo fix in comment. O_CLOEXEC is e, not x." 2019-03-26 22:00:31 +00:00
Elliott Hughes
8ceb95c506 Fix running the tests on the host again.
Bug: N/A
Test: ran the tests on the host under glibc
Change-Id: Id05a896bdd11b231304ed1a08ef24e1a661ee20d
2019-03-26 14:47:08 -07:00
Dan Albert
ba1151c761 Typo fix in comment. O_CLOEXEC is e, not x.
Test: None
Bug: None
Change-Id: I061fe1d3cac6307d878155f1fabdba70da8e9fd5
2019-03-26 13:01:22 -07:00
Treehugger Robot
2059021322 Merge "docs: mention the fact that bionic now uses ifuncs." 2019-03-26 17:32:12 +00:00
Elliott Hughes
3770d93263 docs: mention the fact that bionic now uses ifuncs.
Bug: http://b/123296740
Test: N/A
Change-Id: I2cdc575270ebf32fd8ac1de21182150f5222cf9f
2019-03-26 08:52:07 -07:00
Treehugger Robot
b1ddbfdcdc Merge "Fix internal uses of _PATH_BSHELL." 2019-03-26 09:32:16 +00:00
Pirama Arumuga Nainar
ebe1ae7747 Reserve realtime signal for libprofile-extras
Bug: http://b/128524141

This signal is used by libprofile-extras to trigger flush of gcov
coverage data.

Test: libprofile-extras in system/extras/toolchain-extras
Change-Id: I77dd5b1d67371a9cfaad54ad60254bfb2dd18ba9
2019-03-25 22:09:19 -07:00
Treehugger Robot
1b6517b601 Merge "Make powerof2 macro ubsan safe" 2019-03-26 03:43:23 +00:00
Elliott Hughes
886370c240 Fix internal uses of _PATH_BSHELL.
We regressed on this recently: code under the upstream-* directories has
_PATH_BSHELL defined as a call to __bionic_get_shell_path(). In our own
code, we may as well just call it directly.

Bug: https://issuetracker.google.com/129030706
Test: ran tests
Change-Id: Ic2423f521272be95e67f94771772fe8072636ef0
2019-03-25 17:28:22 -07:00
Elliott Hughes
49e7b68ac2 Merge "popen: stop using _fwalk." 2019-03-25 23:48:47 +00:00
Nick Kralevich
c50b6a2b89 Make powerof2 macro ubsan safe
Subtracting one from the smallest value expressable by the provided
variable could cause an underflow operation. In particular, this is
problematic when code similar to:

  uint64_t foo = 0;
  if (powerof2(foo)) {
    ...;
  }

is run with integer sanitization enabled. The macro would subtract one
from zero, underflowing and triggering the sanitizer.

Make the powerof2() macro ubsan safe, by explicitly handling underflows.

Note: This change DOES NOT make powerof2() accurate. We continue to
falsely return "true" for 0 and negative numbers (see attached tests).

Found while investigating Bug: 122975762
Test: see added testcase
Test: atest ziparchive-tests

Change-Id: I5408ce5c18868d797bcae8f115ddb7c4c1ced81e
2019-03-25 13:51:33 -07:00
Elliott Hughes
137b6f36ef popen: stop using _fwalk.
We don't need this now that popen always uses O_CLOEXEC, and it's unsafe
because _fwalk takes a lock. (In <= P, the equivalent code walked the
list without a lock in the child.)

Bug: http://b/129156634
Test: ran tests
Change-Id: Ic9cee7eb59cfc9397f370d1dc47ea3d3326179ca
2019-03-25 11:18:36 -07:00
Treehugger Robot
e187d92062 Merge "Disable malloc_info test under HWASan." 2019-03-22 22:24:11 +00:00
Evgenii Stepanov
8de6b46ad8 Disable malloc_info test under HWASan.
HWASan does not implement malloc_info.

Test: bionic-unit-tests with SANITIZE_TARGET=hwaddress
Change-Id: I61d50d9110fbca1784ed39950ed6c5540ca0c9a7
2019-03-22 13:23:18 -07:00
Steven Moreland
118ab10d75 Merge "Add /product/bin to path" 2019-03-22 19:59:55 +00:00
Vic Yang
4848b6d7c3 Merge "Use std::move() for rvalue-reference setters and ctors" 2019-03-21 19:00:25 +00:00
Christopher Ferris
d992e1e9fa Merge "Update kernel headers to v5.0.3." 2019-03-21 18:34:35 +00:00
Neil Fuller
11f0d71836 Merge "Use the ANDROID_TZDATA_ROOT environment variable" 2019-03-21 17:43:45 +00:00
Christopher Ferris
e6be532ed6 Update kernel headers to v5.0.3.
Test: Build and boot taimen.
Change-Id: I6ed881b5dc6dc7d0a6cc56edcd09b42ddd185b62
Merged-In: I6ed881b5dc6dc7d0a6cc56edcd09b42ddd185b62
2019-03-21 15:31:06 +00:00
Vic Yang
6b330ac55d Merge "linker: Add support for "whitelisted" property in linker config files" 2019-03-21 04:30:47 +00:00
Logan Chien
e6b6640042 Merge changes Ie7bf555b,Ia7d5fbdc,I3f05ba19
* changes:
  Add introduced-in annotation to fdsan
  Fix get_device_api_level_inlines.h in versioner
  Suppress warnings on pthread_create
2019-03-21 01:50:30 +00:00
Elliott Hughes
4486e57c7d Merge "Document various libc behavior changes." 2019-03-21 00:46:51 +00:00
Elliott Hughes
b282a6d4d3 Document various libc behavior changes.
Test: N/A
Change-Id: I3044c394180058ba500762239b16a4c740caca44
2019-03-20 11:23:53 -07:00
Haibo Huang
b2a29cb95b Merge "Remove workaround for x86 ifunc" 2019-03-20 17:41:43 +00:00