Commit graph

37923 commits

Author SHA1 Message Date
zijunzhao
d9755064a6 Nullability check for utmp module
Bugs: b/245972273
Test: None
Change-Id: Ie37781b87ad13119d1ebc4cd053e184d482d5b58
2023-01-25 19:22:27 +00:00
Elliott Hughes
98c641b096 Merge "Sync strptime.c with upstream." 2023-01-23 22:04:29 +00:00
Treehugger Robot
6ffb6e89f9 Merge "librust_baremetal: Add strtol" 2023-01-23 10:59:25 +00:00
Elliott Hughes
3fa4eea5ce Merge "Defer to getpagesize() in sysconf()." 2023-01-20 16:16:40 +00:00
Treehugger Robot
0ad996d4eb Merge "Re-enable the POSIX header tests for musl." 2023-01-20 02:57:33 +00:00
Elliott Hughes
d05de20794 Re-enable the POSIX header tests for musl.
Bug: http://b/265874089
Test: treehugger
Change-Id: I05892d4a57fcceab0322c910d6482929b82bc5ee
2023-01-19 21:39:37 +00:00
Treehugger Robot
c3952c9059 Merge "Add #ifdefs to make POSIX header tests pass for musl" 2023-01-19 21:31:25 +00:00
Elliott Hughes
357908ddf6 Defer to getpagesize() in sysconf().
It makes sense that callers to getauxval() should have to pay for a
search --- that's exactly what they're asking for. But it seems silly
and unfair for the same to be true of sysconf() --- that's just an
implementation detail. Call getpagesize() directly instead.

Test: treehugger
Change-Id: I327adc55ace73bc6da68c4b34bf829d377bcbd1a
2023-01-19 21:30:26 +00:00
Colin Cross
b6830ca1fc Add #ifdefs to make POSIX header tests pass for musl
Bug: 265874089
Test: m USE_HOST_MUSL=true libbionic_tests_headers_posix
Change-Id: I6ae3ed3b91d5389f838b4a4f66c86bb00a27561a
2023-01-19 11:28:28 -08:00
Treehugger Robot
806d2e71d7 Merge "Link to the best relative relocations docs I know of." 2023-01-19 01:22:03 +00:00
Christopher Ferris
8b42ba6bf2 Merge "Only run mallopt_smoke test on bionic." 2023-01-19 01:21:55 +00:00
Elliott Hughes
bb1cb03ad1 Link to the best relative relocations docs I know of.
Bug: https://github.com/android/ndk/discussions/1831
Test: N/A
Change-Id: Ida6d16a51f133ce3251db6ef8a25f4e1a8f2496e
2023-01-18 23:26:58 +00:00
Christopher Ferris
2ef59371ff Only run mallopt_smoke test on bionic.
Even though glibc has mallopt, there is no way to guarantee that
we use an invalid argument. Since this test is only really useful
for bionic, only run it on bionic.

Test: Ran glibc and verified the test is skipped.
Change-Id: If991e8804b21c83f3d7e3b15a0b60e48da331567
2023-01-18 15:08:37 -08:00
Christopher Ferris
cc66ba30e5 Merge "Add aliases for backtrace related options." 2023-01-18 18:57:11 +00:00
Treehugger Robot
3f44f6b472 Merge "Nullability check for termios module" 2023-01-17 18:58:24 +00:00
zijunzhao
4730fb6cc8 Nullability check for termios module
Bugs: b/245972273
Test: None
Change-Id: Ic91fa6ebc87bff513740c1b757a726505e4dae0e
2023-01-14 01:01:51 +00:00
Treehugger Robot
e87938c435 Merge "Nullability check for execinfo module" 2023-01-13 16:37:41 +00:00
zijunzhao
e951acd2ca Nullability check for execinfo module
Bugs: b/245972273
Test: None
Change-Id: I136926d5b82f62e11df716a26d0847a6bd83a419
2023-01-13 02:14:10 +00:00
Treehugger Robot
716ed9b931 Merge "librust_baremetal: Add memcpy_chk" 2023-01-12 16:26:17 +00:00
Junjie Hu
8655d1741f Add aliases for backtrace related options.
Using the long option names might not fit in the malloc debug option
property since properties have a 92 character limit.

This patch creates new aliases for the original options.

Bug: 264504531
Test: set new options pass
Test: Config unit tests pass.
Change-Id: Id985720f36a2bf0da7b35ff444c2c80eb1fb4363
2023-01-11 15:16:00 -08:00
Chih-hung Hsieh
42f97f5288 Merge "Disable clang-tidy for some malloc tests." 2023-01-11 04:38:25 +00:00
Treehugger Robot
5742addf96 Merge "Nullability check for inttypes module" 2023-01-11 02:38:35 +00:00
Chih-Hung Hsieh
7ab1c81f6b Disable clang-tidy for some malloc tests.
The clang-analyzer-unix.Malloc and other warnings in these
unit tests are either false positive or in
negative tests that can be ignored.

Bug: 259995529
Test: presubmits; make tidy-bionic-libc_subset
Change-Id: Iddabe613d21d3717ba34f9e4d5bb97436279649f
2023-01-10 16:57:44 -08:00
zijunzhao
6daedb7c41 Nullability check for inttypes module
Bugs: b/245972273
Test: None
Change-Id: Ibc6edd389a9f7cb4d2d5f625ba67163eeda98979
2023-01-11 00:32:16 +00:00
Florian Mayer
eae797db66 Merge "Plumb scudo_ring_buffer_size to debuggerd_process_info" 2023-01-10 21:23:33 +00:00
Greg Kaiser
a3d0bf05c3 Merge "Match argument order in cpp file" 2023-01-09 23:13:21 +00:00
Treehugger Robot
e03c720561 Merge "Add chiahungduan@ to OWNERS" 2023-01-09 21:21:26 +00:00
Greg Kaiser
2335213e04 Match argument order in cpp file
We swap the 2nd and 3rd arguments to the CallocEntry constructor
to match the order in the cpp file, and match the C calloc convention.

We also fix an invocation of this constructor.

Change-Id: Iebe16d82a74459e5e957c1d9e2cc1aebb15150d0
Test: TreeHugger
2023-01-09 21:14:18 +00:00
Chia-hung Duan
cce220f0b3 Add chiahungduan@ to OWNERS
Test: n/a

Change-Id: Idb8e10fa0bd0352eed0419d6f380db4f66bc606f
2023-01-09 18:55:48 +00:00
Chia-hung Duan
08af69ab7f Merge "Add the timestamps for each alloc data" 2023-01-08 01:23:56 +00:00
Treehugger Robot
57c8646f59 Merge "Nullability check for malloc module." 2023-01-07 01:28:42 +00:00
Treehugger Robot
7bede42cac Merge "Nullability check for syslog module." 2023-01-06 22:44:40 +00:00
zijunzhao
979d39cb82 Nullability check for syslog module.
Bugs: b/245972273
Test: None
Change-Id: I630597ac2101e16f5566208019a9a54e78fe5667
2023-01-06 20:22:58 +00:00
Florian Mayer
347dc623ec Plumb scudo_ring_buffer_size to debuggerd_process_info
This is a no-op but will be used in upcoming scudo changes that allow to
change the buffer size at process startup time, and as such we will no
longer be able to call __scudo_get_ring_buffer_size in debuggerd.

Bug: 263287052
Change-Id: I18f166fc136ac8314d748eb80a806defcc25c9fd
2023-01-05 14:07:22 -08:00
Chia-hung Duan
f7e8b17dc5 Add the timestamps for each alloc data
With timestamps, we are able to tell the details of allocator
performance such as the average time for malloc() in different size
class, the potential contention time by examing the overlap between
operations, .etc.

Not all malloc et al. operations are recorded with timestamp. Only
operations relates to memory usage change will have them.

Test: All unit tests pass.

Change-Id: I5c2016246a6f10b221387001bb44778969bb26ae
2023-01-05 22:05:42 +00:00
Ryan Prichard
f81ceb939e Merge "linker: Fix memory leak for reserved memory" 2023-01-05 21:19:52 +00:00
Treehugger Robot
47fc44c73c Merge "Nullability check for time module." 2023-01-05 21:01:55 +00:00
Treehugger Robot
c22ef226a3 Merge "Merge librust_baremetal_defaults into its library" 2023-01-05 20:01:06 +00:00
zijunzhao
e620266d1c Nullability check for time module.
Bugs: b/245972273
Test: None
Change-Id: I65adc146f88bbd948f61d2f22bdec344faba09ae
2023-01-05 00:18:18 +00:00
Chih-hung Hsieh
2b76f88282 Merge "Disable clang-tidy for upstream files." 2023-01-04 01:22:03 +00:00
Treehugger Robot
83c6296287 Merge "Nullability check for langinfo module." 2023-01-04 01:00:37 +00:00
Chih-Hung Hsieh
e343db3f54 Disable clang-tidy for upstream files.
Bug: 264302877
Test: presubmit tests; make tidy-bionic_subset
Change-Id: I278201c62e70898103bf20ce8823106418c8fb05
2023-01-03 15:08:22 -08:00
zijunzhao
f043619125 Nullability check for langinfo module.
Bugs: b/245972273
Test: None
Change-Id: I92df36179d25ec668647f15848e5164eeb5d4d70
2023-01-03 19:52:35 +00:00
Pierre-Clément Tosi
816176ccd6 librust_baremetal: Add strtol
Add strtol (required by libfdt), which only depends on libc functions
the library already provides or requires.

Bug: 232900974
Test: m pvmfw_bin # with aosp/2314779
Change-Id: I460571b64369c6bf45fef213252f305e978c694d
2023-01-03 18:07:26 +00:00
Pierre-Clément Tosi
199a62e39b librust_baremetal: Add memcpy_chk
Add __memcpy_chk (used by BoringSSL) and start documenting the
dependencies that the baremetal environment needs to provide to
successfully link the library.

Bug: 256148034
Bug: 256827715
Test: m pvmfw_bin && atest vmbase_example.integration_test
Change-Id: I0d61f4efc5cc26a95b74870be7cd7eebeeb0bd3a
2023-01-03 18:05:30 +00:00
Pierre-Clément Tosi
3af5799387 Merge librust_baremetal_defaults into its library
Test: m pvmfw_bin
Change-Id: I14e74019fc64865af615d033f508bfb0d71eef2f
2023-01-03 17:57:42 +00:00
huangchaochao
bdc3796a87 linker: Fix memory leak for reserved memory
When loading a dynamic library, reserved memory is successful, but fail in other steps, such as loading segments, which will generate a memory leak. Because the reserved memory is not released in time.

Bug: https://issuetracker.google.com/issues/263713888

Change-Id: I556ee02e37db5259df0b6c7178cd9a076dab9725
Signed-off-by: huangchaochao <huangchaochao@bytedance.com>
2022-12-29 15:48:41 +08:00
Treehugger Robot
6f78f756a2 Merge "Replace __packed with __attribute__((__packed__)) in uapi headers" 2022-12-17 01:49:22 +00:00
Chih-hung Hsieh
dc9ad89dfe Merge "Disable clang-tidy for malloc_test.cpp" 2022-12-16 20:20:51 +00:00
Colin Cross
4ac332279d Replace __packed with __attribute__((__packed__)) in uapi headers
Linux uapi headers use __packed as an abbreviation for
__attribute__((__packed__)).  In the upstream kernel headers this
is defined in linux/compiler_attributes.h, but it is not defined
in the uapi headers.  Bionic defines it in sys/cdefs.h, which will
almost always provide the needed definition, but there are uapi
headers that use __packed and do not include any system headers
that would include sys/cdefs.h.  Musl's sys/cdefs.h does not
define __packed, which leads to linker errors when __packed is
treated as a variable name.

Replace __packed with __attribute__((__packed__)) when importing
uapi headers to break the dependency on sys/cdefs.h.

Test: m USE_HOST_MUSL=true on oriole-userdebug in internal master
Change-Id: I45f80f4e5aec868b80ce8eb9d757a3e08ae3e1a9
2022-12-16 11:51:40 -08:00