Commit graph

37984 commits

Author SHA1 Message Date
zijunzhao
4aa1ea04d7 Nullability check for fcntl module
Bugs: b/245972273
Test: None
Change-Id: I48d23c7bc80863cd3a67ab424780308fe6929292
2023-01-30 19:48:44 +00:00
Elliott Hughes
b0360a94c3 Merge "Add (no-op) ifuncs for SVE optimized routines." 2023-01-27 00:06:57 +00:00
Christopher Ferris
02b6bbc7b7 Verify that allocated memory is always zeroed.
If this is a low ram device, then do not run these tests. Otherwise,
verify that memory returned from the allocator is zero.

Bug: 171429763
Bug: 264539505
Bug: 265431478

Test: New unit tests pass on scudo.
Test: New unit tests fail on original jemalloc.
Test: New unit tests pass on jemalloc that always zeroes memory.
Test: New unit tests are skipped on low ram device.
Test: Ran unit tests atest CtsBionicTestCases in above scenarios.
Change-Id: Id62ab74f649c0f7c14a951235fe79972926ecec0
2023-01-26 15:19:09 -08:00
Treehugger Robot
ec612d46c5 Merge "Nullability check for nl_types module" 2023-01-26 16:06:14 +00:00
Vincent Donnefort
8606375bbe Merge "linker: Fallback to argv[0] to get the executable info" 2023-01-26 10:42:24 +00:00
zijunzhao
64b1fe21b7 Nullability check for nl_types module
Bugs: b/245972273
Test: None
Change-Id: Idc05efd6613c99292bd3c095679ac20bb6e8bf8f
2023-01-26 06:48:13 +00:00
Elliott Hughes
3d8e98f8bd Add (no-op) ifuncs for SVE optimized routines.
This patch doesn't *enable* the SVE optimized routines, but it does let
us see if switching them to ifuncs will cause any app compat issues, so
that we can more easily use the optimized routines in future.

Test: treehugger
Change-Id: Ic5fe570bd21687da397b48127bf688f7ec68dd0c
2023-01-25 23:33:39 +00:00
Treehugger Robot
b1f9b1b224 Merge "Nullability check for utmp module" 2023-01-25 21:34:27 +00:00
Elliott Hughes
8b47a35072 Merge "Track upstream arm-optimized-routines changes." 2023-01-25 20:21:25 +00:00
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
5ec0bfae50 Track upstream arm-optimized-routines changes.
The MTE-compatible routines are now faster than the incompatible ones,
so they merged them upstream.

I've left the ifunc boilerplate on the assumption that I'll be back
later to enable the new SVE variants.

Test: treehugger
Change-Id: Ic894bfb350b9aa70e307bca1c4978624b3e5f4fd
2023-01-25 18:12:18 +00:00
Vincent Donnefort
2efa017409 linker: Fallback to argv[0] to get the executable info
Enable linking on a system without /proc mounted by falling back to
reading the executable paths from argv[0] when /proc/exe/self can't be
found.

Bug: 254835242
Change-Id: I0735e873fa4e2f439688722c4a846fb70ff398a5
2023-01-25 16:34:43 +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