Commit graph

40144 commits

Author SHA1 Message Date
Treehugger Robot
8003988d69 Merge changes Ia6b8cff4,I390ea200 into main am: 007bb4d1e8
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2670165

Change-Id: Id33e2c72e8a6f6919bfdd433a2a0a67037952bba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-04 22:59:06 +00:00
Dan Albert
4a1da4a43b Merge changes I51c6536e,Ifa0a555e,Iead5eb01,I11236609,Ia307cbd6 into main am: e1fbf3e15a
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2693373

Change-Id: I9a9de59c5399d1f02ef6c883fc96d1eab0ff86c7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-04 22:58:50 +00:00
Christopher Ferris
636b9b9bf2 Merge "Increase time to set allocation limit." into main 2023-08-04 22:54:05 +00:00
Treehugger Robot
b00078830d Merge "Update NOTICE file." into main 2023-08-04 22:50:15 +00:00
Treehugger Robot
23c97e925c Merge "Fix signature of mbstate_reset_and_return." into main 2023-08-04 22:36:05 +00:00
Treehugger Robot
007bb4d1e8 Merge changes Ia6b8cff4,I390ea200 into main
* changes:
  Make multibyte result constants public.
  Disable 0b parsing test for glibc.
2023-08-04 22:35:29 +00:00
Dan Albert
e1fbf3e15a Merge changes I51c6536e,Ifa0a555e,Iead5eb01,I11236609,Ia307cbd6 into main
* changes:
  Improve output for failed wcsto* tests.
  Add missing setlocale/uselocale for glibc tests.
  Fix test for out of range multibyte characters.
  Fix wchar tests for zero length conversions.
  Fix wcsto*_l tests for glibc.
2023-08-04 22:18:23 +00:00
Elliott Hughes
bc192cff55 Add the L() macro for local labels to <private/bionic_asm.h>.
This lets us remove the riscv64 "sys/asm.h" file. It turns out everyone
loves this macro --- tons of x86 and arm assembler is already using it!

I'll clean up some of the now-duplicate definitions separately, and I'll
move the assembler we wrote ourselves over to this macro (rather than
the current `.L_foo` style) too.

Test: built riscv64 _and_ arm/arm64 _and_ x86/x86-64
Change-Id: If3f93c9b71094a8bed1fd1bb81bb83ec60ce409e
2023-08-04 15:12:30 -07:00
Christopher Ferris
e9ffc52da7 Increase time to set allocation limit.
Under some circumstances, it's possible to fail the enable allocation
limit android_mallopt call. Increase the total allowed time for the
function to complete.

In addition, if the enable fails, allow another limit call to succeed
in the future.

Finally, change the limit test to use _exit instead of exit.

Bug: 291672185

Test: Ran limit test thousands of times.
Test: Forced the limit to fail and verified the second call passes.
Change-Id: I0948e6fd97231a7538b9b82b76f0a207386681b1
2023-08-04 13:10:48 -07:00
Dan Albert
16007d5204 Fix result for zero-length non-null conversion.
Bug: None
Test: deleted the xfail half of the test
Change-Id: I1a60d6ef27ebad14de79ac3bc637a6f2280334d8
2023-08-04 19:48:56 +00:00
Dan Albert
013d747dd3 Fix signature of mbstate_reset_and_return.
Bug: None
Test: None
Change-Id: Ifab9f68f542354fafa8514bf4ea73b185796bdad
2023-08-04 19:48:35 +00:00
Dan Albert
a9e914dd2f Make multibyte result constants public.
The magic numbers that C defines are obnoxious. We had partial
definitions for these internally. Add the missing one and move them to
a public header for anyone else that may want to use them.

Bug: None
Test: None
Change-Id: Ia6b8cff4310bcccb23078c52216528db668ac966
2023-08-04 19:48:35 +00:00
Dan Albert
3a8fed1ac3 Fix mismatched return types for surrogate pairs.
We've had these backward all this time. The relevant quote is in a
code comment in the implementation, but the first call after
completely decoding a code point that requires a surrogate pair should
return the number of bytes decoded by the most recent call, and the
second call should return -3 (if only C had given those some named
constants that might have been more obviously wrong).

Bug: https://issuetracker.google.com/289419882
Test: Fixed the test, tests run against glibc and musl to confirm
Change-Id: Idabf01075b1cad35b604ede8d676d6f0b1dc91e6
2023-08-04 19:48:35 +00:00
Dan Albert
9f30c6ba92 Disable 0b parsing test for glibc.
Bug: None
Test: ran on glibc
Change-Id: I390ea20015f94b26ab3cdbeb6ade6cbcfefa7b0a
2023-08-04 19:48:34 +00:00
Elliott Hughes
a137234742 Update NOTICE file.
I don't know why we seem to keep missing this so much these days...

Test: treehugger
Change-Id: I018a528f35aa938f8fc5cdafe2eaf3f1bbc1a6d9
2023-08-04 12:43:21 -07:00
Elliott Hughes
7186a5c4f1 Merge "Sync upstream FreeBSD libm." into main am: 9a80691e38 am: 6f4d2c56ce
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2693806

Change-Id: Id71262445d49fa5336f75b0d511206e29b1b8bd0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-04 16:10:48 +00:00
Elliott Hughes
6f4d2c56ce Merge "Sync upstream FreeBSD libm." into main am: 9a80691e38
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2693806

Change-Id: Ib32ad8de78764131ab9bc119be1b08d5aed4096f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-04 15:26:33 +00:00
Elliott Hughes
9a80691e38 Merge "Sync upstream FreeBSD libm." into main 2023-08-04 14:51:38 +00:00
Dan Albert
a40159fa22 Improve output for failed wcsto* tests.
Bug: None
Test: ran these and finally understood which sub-test was failing
Change-Id: I51c6536eba4b9c82ed4b062b1702128e23cf339c
2023-08-03 21:05:29 +00:00
Dan Albert
9f78c51e03 Add missing setlocale/uselocale for glibc tests.
Bug: None
Test: these
Change-Id: Ifa0a555e3a771b27ba733b1316f7531c7b262f8b
2023-08-03 21:05:29 +00:00
Dan Albert
5325653b0f Fix test for out of range multibyte characters.
Same as in uchar_test.cpp: glibc implements a much older unicode
standard which allows these.

Bug: None
Test: this is a test
Change-Id: Iead5eb01d391be85a7b1a034ea9e7f8828e81cdb
2023-08-03 21:04:31 +00:00
Elliott Hughes
4088e3a587 Sync upstream FreeBSD libm.
Test: treehugger
Change-Id: I583a3e93821d512c975db34fc1610ffd22445d58
2023-08-03 13:33:56 -07:00
Dan Albert
512469a858 Fix wchar tests for zero length conversions.
Same as the previous change for the uchar tests: the tests are wrong
to match bionic's wrong implementation. Fix the test to encode the bug
for now while I get the tests into good shape, then I'll be back to
fix the bugs and remove the test differences.

Bug: None
Test: this is a test
Change-Id: I1123660994f755f8bac1f2656f6890d5a43310b3
2023-08-03 20:03:28 +00:00
Dan Albert
686e67d077 Fix wcsto*_l tests for glibc.
glibc immediately dereferences the locale passed to all wcsto*_l
functions, even if it won't be used, and even if it's
LC_GLOBAL_LOCALE, which isn't a pointer to valid memory.

Bug: None
Test: this is the test
Change-Id: Ia307cbd6a5c5b4b904c978a03e6d06c1cef6ceed
2023-08-03 19:59:11 +00:00
Treehugger Robot
1b716072e9 Merge "Define gettid symbol when testing on glibc < 2.30" into main am: e31c863307 am: 8b2024528d
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2680165

Change-Id: If8fe4db010e62d2bf24e7432108b1bfa0b3be6f4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-03 18:12:56 +00:00
Treehugger Robot
8b2024528d Merge "Define gettid symbol when testing on glibc < 2.30" into main am: e31c863307
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2680165

Change-Id: I462f6d0028d7abae429728d9bb1363daa78e95b9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-03 17:30:27 +00:00
Treehugger Robot
e31c863307 Merge "Define gettid symbol when testing on glibc < 2.30" into main 2023-08-03 16:44:11 +00:00
Elliott Hughes
1963ca761c Merge "riscv64: inline raise." into main am: 249ae824fd am: 848c9f4fee
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2689850

Change-Id: I1478dabdf2332cf6bc9429a38bd0afcdf58c9699
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-03 16:00:29 +00:00
Elliott Hughes
848c9f4fee Merge "riscv64: inline raise." into main am: 249ae824fd
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2689850

Change-Id: I3156528556ff4830190ac17fa8ad4a6170de0e77
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-03 14:59:47 +00:00
Tomasz Wasilczyk
704e4e6936 Define gettid symbol when testing on glibc < 2.30
Bug: 289414897
Test: it builds
Change-Id: Ic44514953f34096e8a681ef2587439953096ba53
2023-08-03 07:19:17 -07:00
Elliott Hughes
249ae824fd Merge "riscv64: inline raise." into main 2023-08-03 14:07:49 +00:00
Elliott Hughes
0e5b89c4bf riscv64: inline raise.
Not necessary (as demonstrated by the lack of this for x86), but this
saves one stack frame in aborts, which gets you one more useful stack
frame in logs and clustering etc, which improves your chances of finding
your bug.

Test: crasher64 abort
Change-Id: Ieb214f3b46520161edc1e53c0d766353b777d8ba
2023-08-02 16:04:25 -07:00
Matthias Männich
ef9aeea7e8 Merge "libm/libc: remove 'allow_untyped_symbols' flags" into main am: 85beaceda3 am: 3e514b5a86
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2647200

Change-Id: Ied9542e67dada689b2c2f4e85af32002075b92b5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-01 23:06:15 +00:00
Matthias Männich
3e514b5a86 Merge "libm/libc: remove 'allow_untyped_symbols' flags" into main am: 85beaceda3
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2647200

Change-Id: I3bf41b28bf2ab6a538b950305a117944eb5afc9a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-01 22:20:16 +00:00
Matthias Männich
85beaceda3 Merge "libm/libc: remove 'allow_untyped_symbols' flags" into main 2023-08-01 21:33:16 +00:00
Matthias Maennich
68cbdca6bb libm/libc: remove 'allow_untyped_symbols' flags
Those flags were used to suppress ABI tidy errors, but by now are not in
use anymore and can safely be removed.

Bug: 156513478
Change-Id: Ibc9625d139f933e48ebb4ddebe70d424f6231f3f
Signed-off-by: Matthias Maennich <maennich@google.com>
2023-08-01 17:23:49 +00:00
Elliott Hughes
43f24adf4b Merge "riscv64: use vdso for __riscv_hwprobe()." into main am: 2df6e5fa8f am: c02a094d8a
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2681597

Change-Id: I6fd1d2518ba64b1e693340d1cf408649ae3adc12
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-01 15:30:58 +00:00
Elliott Hughes
7eba97778c Merge "riscv64: pass a null argument to ifunc resolvers." into main am: 95936aec6f am: cf530e5d7e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2684726

Change-Id: I9458007ceb806cbdbee476f492c3a9de3326480b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-01 15:30:47 +00:00
Elliott Hughes
c857e21555 Merge "avx2 memset: add missing vzeroupper." into main am: 1af07a92d6 am: ff6c3d0908
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2676497

Change-Id: I5e889964120d049c910571c873be5f029447bfae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-01 15:30:35 +00:00
Elliott Hughes
c02a094d8a Merge "riscv64: use vdso for __riscv_hwprobe()." into main am: 2df6e5fa8f
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2681597

Change-Id: I6c219cdcc63c30da25fb4d7e074a18dee9d9de37
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-01 14:51:36 +00:00
Elliott Hughes
cf530e5d7e Merge "riscv64: pass a null argument to ifunc resolvers." into main am: 95936aec6f
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2684726

Change-Id: I3b481dbe34a96a72a09fa5b2e4d3ea7fbb7d4f18
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-01 14:51:24 +00:00
Elliott Hughes
ff6c3d0908 Merge "avx2 memset: add missing vzeroupper." into main am: 1af07a92d6
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2676497

Change-Id: If11a976735047f69cc6b2d99ef2b8de96f046afd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-01 14:51:11 +00:00
Elliott Hughes
2df6e5fa8f Merge "riscv64: use vdso for __riscv_hwprobe()." into main 2023-08-01 14:32:52 +00:00
Elliott Hughes
95936aec6f Merge "riscv64: pass a null argument to ifunc resolvers." into main 2023-08-01 14:32:35 +00:00
Elliott Hughes
1af07a92d6 Merge "avx2 memset: add missing vzeroupper." into main 2023-08-01 14:08:00 +00:00
Elliott Hughes
b08f79af78 riscv64: pass a null argument to ifunc resolvers.
glibc maintainer Florian Weimer pointed out that glibc passes a null first
argument to riscv64 ifunc resolvers. While not super useful right now,
that does make it much easier to switch to providing arguments in future,
such as my favorite idea of passing a default set of hwprobe key/value
pairs, along with a count of how many pairs.

Test: treehugger
Change-Id: Ibe2148dc28aa6ad230e6324b6d725fe472b7ef33
2023-07-31 19:34:38 +00:00
Elliott Hughes
9a7d048712 riscv64: use vdso for __riscv_hwprobe().
Also de-pessimize time(), where the vdso entrypoint only exists on
x86/x86-64 anyway.

Bug: https://github.com/google/android-riscv64/issues/8
Test: strace
Change-Id: I14cb2a3130b6ff88d06d43ea13d3a825a26de290
2023-07-31 12:24:31 -07:00
Florian Mayer
ff078f0096 Merge "Don't assume size of functions." into main am: 8a2f0358ed am: 41c6ed2eed
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2681595

Change-Id: I3e88243b150bf4f0c804fd4bcdcf3f41cd3764c4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-29 03:02:04 +00:00
Florian Mayer
41c6ed2eed Merge "Don't assume size of functions." into main am: 8a2f0358ed
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2681595

Change-Id: I1d6694af1f8e0401ecfd340e0806e51632eda216
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-29 02:22:18 +00:00
Florian Mayer
8a2f0358ed Merge "Don't assume size of functions." into main 2023-07-29 01:48:02 +00:00