Christopher Ferris
0ceeea5a49
Merge "Add new mallopt M_LOG_STATS." am: 90e2827762
am: 29bedad140
am: 1e364e01b8
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2585453
Change-Id: Ia79a45c3a23c008e0c22cfb7e2c5e4ee000aa6f4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-20 22:42:53 +00:00
Christopher Ferris
1e364e01b8
Merge "Add new mallopt M_LOG_STATS." am: 90e2827762
am: 29bedad140
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2585453
Change-Id: I9b89537c052534561879519db78032cd7cc4bacc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-20 21:52:45 +00:00
Christopher Ferris
29bedad140
Merge "Add new mallopt M_LOG_STATS." am: 90e2827762
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2585453
Change-Id: I86bd0363a9cc43bb6b0de32b95e1b68945c1d212
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-20 21:12:47 +00:00
Christopher Ferris
90e2827762
Merge "Add new mallopt M_LOG_STATS."
2023-06-20 20:35:53 +00:00
Elliott Hughes
5c5e6d1ba1
Merge "<arpa/nameser.h>: rationalize __INTRODUCED_IN." am: e405c90f19
am: fbca3365f9
am: 50fa6162f2
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2626138
Change-Id: I06f7688262f18e5c52385349dd0cd4053f31359a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-20 18:36:12 +00:00
Elliott Hughes
34e8dfd85a
Merge "_FILE_OFFSET_BITS is spelled with one underscore." am: 0749b7bcbf
am: 1e0a7c3690
am: d570e3f8be
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2627534
Change-Id: Ibc1d2a65b0f889fcb7d62c7f65fd64a451bf3a3f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-20 18:35:48 +00:00
Colin Cross
7b6548785c
Merge "Remove symbols that don't exist in musl from linker benchmark" am: 0ba161b6af
am: 2c071df366
am: 9da60c4bce
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2626244
Change-Id: Id99682172cbe66f7cc54de48c415d907d74bdf0b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-20 18:35:16 +00:00
Elliott Hughes
50fa6162f2
Merge "<arpa/nameser.h>: rationalize __INTRODUCED_IN." am: e405c90f19
am: fbca3365f9
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2626138
Change-Id: I89a3407a3f58c4b5af6913f7b39cd832776dd45c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-20 17:52:48 +00:00
Elliott Hughes
d570e3f8be
Merge "_FILE_OFFSET_BITS is spelled with one underscore." am: 0749b7bcbf
am: 1e0a7c3690
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2627534
Change-Id: Ieb38cb181ab712a2d985fe04c5abbaee083ac0ef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-20 17:52:37 +00:00
Colin Cross
9da60c4bce
Merge "Remove symbols that don't exist in musl from linker benchmark" am: 0ba161b6af
am: 2c071df366
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2626244
Change-Id: Idd6a098733e0ec8bdc357d141f534b91ba1dcdba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-20 17:52:10 +00:00
Elliott Hughes
fbca3365f9
Merge "<arpa/nameser.h>: rationalize __INTRODUCED_IN." am: e405c90f19
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2626138
Change-Id: Iabe705fb4061ab87b0b461d8741d32bc668a5c4e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-20 17:10:08 +00:00
Elliott Hughes
1e0a7c3690
Merge "_FILE_OFFSET_BITS is spelled with one underscore." am: 0749b7bcbf
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2627534
Change-Id: I40bd2bffa6d919eb19662af9c5cb3701d8b27c0d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-20 17:09:54 +00:00
Colin Cross
2c071df366
Merge "Remove symbols that don't exist in musl from linker benchmark" am: 0ba161b6af
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2626244
Change-Id: I053db17121ae35c64694abab7b95b4837442ae7c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-20 17:09:23 +00:00
Elliott Hughes
e405c90f19
Merge "<arpa/nameser.h>: rationalize __INTRODUCED_IN."
2023-06-20 16:56:13 +00:00
Elliott Hughes
0749b7bcbf
Merge "_FILE_OFFSET_BITS is spelled with one underscore."
2023-06-20 16:55:24 +00:00
Colin Cross
0ba161b6af
Merge "Remove symbols that don't exist in musl from linker benchmark"
2023-06-20 16:28:05 +00:00
Christopher Ferris
e9a7b81d4a
Add new mallopt M_LOG_STATS.
...
This new mallopt cause statistics of the allocator to be printed in
the log.
Add a stats print for jemalloc.
This is designed to be used as part of a dumpsys meminfo --XXXX
option so that it's easier to get information about apps that
have an unusual memory footprint.
Test: Unit tests pass.
Test: Ran on a device using jemalloc and verified log data.
Test: Ran on a device using scudo and verified log data.
Change-Id: I6fa44ce619c064b2596fbbb478c231994af94f4c
2023-06-17 00:00:02 +00:00
Elliott Hughes
9dbfe8bb69
<arpa/nameser.h>: rationalize __INTRODUCED_IN.
...
Investigation shows that the symbols that claimed to have been in 32-bit
builds one API level earlier than in 64-bit builds actually weren't ---
everything was actually API level 22. This patch fixes the libc.map.txt
to match reality, and then simplifies the __INTRODUCED_IN()
incantations.
Investigation also shows that we have a bunch of unused #defines, so
this patch removes the ones that don't correspond to functions we
actually expose.
Test: treehugger
Change-Id: I540dd0d1d9561cac17c55eb68a07bed58dd718fa
2023-06-16 15:59:52 -07:00
Elliott Hughes
836e81d019
_FILE_OFFSET_BITS is spelled with one underscore.
...
Test: treehugger
Change-Id: Ic21082ffa1083b63a95514dcd7f2d9e23f84c9b0
2023-06-16 11:55:07 -07:00
Elliott Hughes
bc93a2acf2
Merge "Expose tzalloc()/localtime_rz()/mktime_z()/tzfree()." am: f5cd29269f
am: 472f1d099e
am: ecb17c8cf4
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2626240
Change-Id: I1cebfa0141dc9ed977927f88ba5813f18427deda
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 17:40:04 +00:00
Elliott Hughes
ecb17c8cf4
Merge "Expose tzalloc()/localtime_rz()/mktime_z()/tzfree()." am: f5cd29269f
am: 472f1d099e
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2626240
Change-Id: Ic74d7c1db0807eae3bafaca6bcd38974f148b9fb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 16:50:22 +00:00
Elliott Hughes
472f1d099e
Merge "Expose tzalloc()/localtime_rz()/mktime_z()/tzfree()." am: f5cd29269f
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2626240
Change-Id: I91ec19b2e2acad7328059bf60c5f25b53bf6d614
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 16:09:25 +00:00
Elliott Hughes
f5cd29269f
Merge "Expose tzalloc()/localtime_rz()/mktime_z()/tzfree()."
2023-06-16 15:14:24 +00:00
Elliott Hughes
2bd4316bd6
Expose tzalloc()/localtime_rz()/mktime_z()/tzfree().
...
* Rationale
The question often comes up of how to use multiple time zones in C code.
If you're single-threaded, you can just use setenv() to manipulate $TZ.
toybox does this, for example. But that's not thread-safe in two
distinct ways: firstly, getenv() is not thread-safe with respect to
modifications to the environment (and between the way putenv() is
specified and the existence of environ, it's not obvious how to fully
fix that), and secondly the _caller_ needs to ensure that no other
threads are using tzset() or any function that behaves "as if" tzset()
was called (which is neither easy to determine nor easy to ensure).
This isn't a bigger problem because most of the time the right answer
is to stop pretending that libc is at all suitable for any i18n, and
switch to icu4c instead. (The NDK icu4c headers do not include ucal_*,
so this is not a realistic option for most applications.)
But what if you're somewhere in between? Like the rust chrono library,
for example? What then?
Currently their "least worst" option is to reinvent the entire wheel and
read our tzdata files. Which isn't a great solution for anyone, for
obvious maintainability reasons.
So it's probably time we broke the catch-22 here and joined NetBSD in
offering a less broken API than standard C has for the last 40 years.
Sure, any would-be caller will have to have a separate "is this
Android?" and even "is this API level >= 35?" path, but that will fix
itself sometime in the 2030s when developers can just assume "yes, it
is", whereas if we keep putting off exposing anything, this problem
never gets solved.
(No-one's bothered to try to implement the std::chrono::time_zone
functionality in libc++ yet, but they'll face a similar problem if/when
they do.)
* Implementation
The good news is that tzcode already implements these functions, so
there's relatively little here.
I've chosen not to expose `struct state` because `struct __timezone_t`
makes for clearer error messages, given that compiler diagnostics will
show the underlying type name (`struct __timezone_t*`) rather than the
typedef name (`timezone_t`) that's used in calling code.
I've moved us over to FreeBSD's wcsftime() rather than keep the OpenBSD
one building --- I've long wanted to only have one implementation here,
and FreeBSD is already doing the "convert back and forth, calling the
non-wide function in the middle" dance that I'd hoped to get round to
doing myself someday. This should mean that our strftime() and
wcsftime() behaviors can't easily diverge in future, plus macOS/iOS are
mostly FreeBSD, so any bugs will likely be interoperable with the other
major mobile operating system, so there's something nice for everyone
there!
The FreeBSD wcsftime() implementation includes a wcsftime_l()
implementation, so that's one stub we can remove. The flip side of that
is that it uses mbsrtowcs_l() and wcsrtombs_l() which we didn't
previously have. So expose those as aliases of mbsrtowcs() and
wcsrtombs().
Bug: https://github.com/chronotope/chrono/issues/499
Test: treehugger
Change-Id: Iee1b9d763ead15eef3d2c33666b3403b68940c3c
2023-06-16 08:10:47 -07:00
Dimitry Ivanov
29fd8c0fbc
Merge "Use more appropriate param type for __early_abort" am: 81d1e3df44
am: 344ab813b3
am: f11be221ad
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2627970
Change-Id: I35788ec65d04d2a3de62ffb8b2955ce8c571852a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 11:59:58 +00:00
Dimitry Ivanov
f11be221ad
Merge "Use more appropriate param type for __early_abort" am: 81d1e3df44
am: 344ab813b3
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2627970
Change-Id: Ie07ed2ed5cab1a37f67cf7e3166cd1ff1c1d3b2a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 11:11:16 +00:00
Dimitry Ivanov
344ab813b3
Merge "Use more appropriate param type for __early_abort" am: 81d1e3df44
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2627970
Change-Id: Ie9653e539b6be663e9e805f3cdb85b47ed04787f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 10:29:45 +00:00
Dimitry Ivanov
81d1e3df44
Merge "Use more appropriate param type for __early_abort"
2023-06-16 09:53:00 +00:00
Treehugger Robot
f4f99abf79
Merge "Nullability check for socket module." am: 0181dd9f05
am: 3960b11233
am: f0ff731e8b
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2605708
Change-Id: I1b8806d993cb0f3585cc605e857aeadb8ddb0b6a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 05:04:24 +00:00
Colin Cross
61c0dcec9b
Remove symbols that don't exist in musl from linker benchmark
...
The lseek64, lstat64, pread64 and pwrite64 symbols have been removed
from musl 1.2.4.
Bug: 286415000
Test: builds
Change-Id: Icba9e92e1ccbb5b52d6c60e554ab411c9e5c1954
2023-06-15 22:02:10 -07:00
Treehugger Robot
f0ff731e8b
Merge "Nullability check for socket module." am: 0181dd9f05
am: 3960b11233
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2605708
Change-Id: I04aa1fc5015dda715f705eb519af2f6fee5d60fd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 04:15:11 +00:00
Treehugger Robot
3960b11233
Merge "Nullability check for socket module." am: 0181dd9f05
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2605708
Change-Id: I2f88520dbbfac04a0e50d78c9e590c894e827b62
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 03:33:11 +00:00
Treehugger Robot
0181dd9f05
Merge "Nullability check for socket module."
2023-06-16 02:37:38 +00:00
zijunzhao
4e274fa0a9
Nullability check for socket module.
...
Bugs: b/245972273
Test: adb shell
Change-Id: Id0f1aa156ff010358f2484b2f58aa3beacc1409c
2023-06-15 23:51:02 +00:00
dimitry
e07704aa6e
Use more appropriate param type for __early_abort
...
Test: build, start emulator
Change-Id: I5f31ceb9a85ee7750f17edff76782c778a4515d8
2023-06-15 14:40:42 +00:00
Treehugger Robot
374c55909b
Merge "Nullability check for wctype module." am: 5c6961ff6d
am: 957f7a1203
am: 4cb0d63209
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2626775
Change-Id: Ife44b81f3e504fdcc408144f0fbde8f6473a9786
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-15 03:57:48 +00:00
Treehugger Robot
4cb0d63209
Merge "Nullability check for wctype module." am: 5c6961ff6d
am: 957f7a1203
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2626775
Change-Id: I7415380dbb5db1e9c093002dc9de5b628db06123
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-15 02:24:33 +00:00
Treehugger Robot
957f7a1203
Merge "Nullability check for wctype module." am: 5c6961ff6d
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2626775
Change-Id: I3c1b5b1fed8a5caddb3a5967374beb4f8a243f78
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-15 01:42:42 +00:00
Treehugger Robot
e84c18791b
Merge "<iconv.h>: clarify the docs a bit more." am: 42e7ac10ed
am: 5e6c6e6e0f
am: 1174fd0360
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2627204
Change-Id: Idcbc21c9f5cfc58f96e15fbf2e780b0798242367
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-15 01:41:52 +00:00
Elliott Hughes
318e4187a9
Merge "<arpa/nameser.h>: don't use __INTRODUCED_IN_64 in a defined(__LP64__) block." am: db14a74701
am: 4653bfa75e
am: 305154ecae
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2621717
Change-Id: Ic0122a33993c02608ea789157a66805d9b6c5189
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-15 01:41:31 +00:00
Zijun Zhao
6b3e90ab39
Merge "Nullability check for modules in /platform directory." am: a872000550
am: 6eb5edccdd
am: 43c8a10226
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2623060
Change-Id: Ifddc23084aafe63e7af4a2721d31edc1fdb6b9fa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-15 01:39:59 +00:00
Treehugger Robot
5c6961ff6d
Merge "Nullability check for wctype module."
2023-06-15 00:29:25 +00:00
Treehugger Robot
1174fd0360
Merge "<iconv.h>: clarify the docs a bit more." am: 42e7ac10ed
am: 5e6c6e6e0f
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2627204
Change-Id: Ie14a0c8ec245bacd7b31686fad05bbc0c26644be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-15 00:10:52 +00:00
Elliott Hughes
305154ecae
Merge "<arpa/nameser.h>: don't use __INTRODUCED_IN_64 in a defined(__LP64__) block." am: db14a74701
am: 4653bfa75e
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2621717
Change-Id: Ia89e8d70c0c42bbfdb2acc9f715d9cbe045ae306
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-15 00:10:42 +00:00
Zijun Zhao
43c8a10226
Merge "Nullability check for modules in /platform directory." am: a872000550
am: 6eb5edccdd
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2623060
Change-Id: I87ba9d310f559fbedee3a9996371631029a918c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-15 00:09:22 +00:00
Treehugger Robot
5e6c6e6e0f
Merge "<iconv.h>: clarify the docs a bit more." am: 42e7ac10ed
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2627204
Change-Id: Ibdf7840ef0d1399a7ab451fff4dfeef3325880c6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 23:26:29 +00:00
Elliott Hughes
4653bfa75e
Merge "<arpa/nameser.h>: don't use __INTRODUCED_IN_64 in a defined(__LP64__) block." am: db14a74701
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2621717
Change-Id: Iec3363dd37b032209867837b151947efbbaac2ce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 23:26:19 +00:00
Zijun Zhao
6eb5edccdd
Merge "Nullability check for modules in /platform directory." am: a872000550
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2623060
Change-Id: I5a7b724b6269aafba9a1aecc03f2199bf4b58510
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 23:25:07 +00:00
Treehugger Robot
b53cea63cd
Merge "Implement C23 scanf 'wf' length modifiers" am: 6ab3be5f03
am: 2a08cfbb73
am: 4a4fb53b3b
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2623058
Change-Id: Ia4931c754e2000bcbda78f7f8d626b5674bbf88b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 23:24:31 +00:00
Treehugger Robot
42e7ac10ed
Merge "<iconv.h>: clarify the docs a bit more."
2023-06-14 23:16:06 +00:00