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
Elliott Hughes
63043c04ad
Merge "riscv64: add <sys/hwprobe.h>." into main am: c4d3867b6c
am: 98f649e224
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2679530
Change-Id: I96098f18a8f61cacd803311c2d233faac8bf58c1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-29 01:35:45 +00:00
Elliott Hughes
98f649e224
Merge "riscv64: add <sys/hwprobe.h>." into main am: c4d3867b6c
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2679530
Change-Id: I0edb9396e8a1db6f8cd64e21bad0f59af25d6315
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-29 00:54:07 +00:00
Elliott Hughes
c4d3867b6c
Merge "riscv64: add <sys/hwprobe.h>." into main
2023-07-28 23:53:15 +00:00
Florian Mayer
8fc5ab4f72
Don't assume size of functions.
...
Bug: 293532332
Change-Id: I93a8c5380b17b77ff85f4027b48ea5318a03e9e3
2023-07-28 15:51:38 -07:00
Elliott Hughes
f3d6b44e2b
riscv64: add <sys/hwprobe.h>.
...
This is source compatible with the current proposal for glibc.
Bug: https://github.com/google/android-riscv64/issues/27
Test: treehugger
Change-Id: I428777e4eac1fe643d442a93a4b3ad1fdf0ffd97
2023-07-28 09:29:06 -07:00
Elliott Hughes
7c95495ead
avx2 memset: add missing vzeroupper
.
...
Also improve a few labels. This actually improves performance slightly,
and removes the weird behavior I was seeing around 512 bytes in the
"before" numbers...
Before:
```
BM_string_memset/8/0 2.12 ns 2.12 ns 332002763 bytes_per_second=3.52172G/s
BM_string_memset/16/0 2.36 ns 2.36 ns 297459840 bytes_per_second=6.31618G/s
BM_string_memset/32/0 2.36 ns 2.36 ns 296996995 bytes_per_second=12.6321G/s
BM_string_memset/64/0 2.37 ns 2.36 ns 296196644 bytes_per_second=25.2097G/s
BM_string_memset/512/0 65.9 ns 65.8 ns 10609200 bytes_per_second=7.24172G/s
BM_string_memset/1024/0 69.5 ns 69.5 ns 10079176 bytes_per_second=13.7312G/s
BM_string_memset/8192/0 123 ns 123 ns 5726682 bytes_per_second=62.2494G/s
BM_string_memset/16384/0 183 ns 183 ns 3832127 bytes_per_second=83.5219G/s
BM_string_memset/32768/0 306 ns 306 ns 2292654 bytes_per_second=99.8293G/s
BM_string_memset/65536/0 570 ns 569 ns 1224926 bytes_per_second=107.185G/s
BM_string_memset/131072/0 1067 ns 1067 ns 654098 bytes_per_second=114.395G/s
```
After:
```
BM_string_memset/8/0 2.34 ns 2.34 ns 299919615 bytes_per_second=3.18993G/s
BM_string_memset/16/0 2.58 ns 2.58 ns 271170449 bytes_per_second=5.76711G/s
BM_string_memset/32/0 2.61 ns 2.61 ns 266003840 bytes_per_second=11.4245G/s
BM_string_memset/64/0 2.62 ns 2.62 ns 269191710 bytes_per_second=22.784G/s
BM_string_memset/128/0 2.84 ns 2.84 ns 244486639 bytes_per_second=41.994G/s
BM_string_memset/256/0 4.23 ns 4.23 ns 165575532 bytes_per_second=56.4047G/s
BM_string_memset/512/0 7.12 ns 7.12 ns 99398933 bytes_per_second=67.0164G/s
BM_string_memset/1024/0 10.9 ns 10.9 ns 64108888 bytes_per_second=87.2884G/s
BM_string_memset/8192/0 63.6 ns 63.6 ns 11012138 bytes_per_second=119.989G/s
BM_string_memset/16384/0 127 ns 127 ns 5506888 bytes_per_second=120.065G/s
BM_string_memset/32768/0 252 ns 251 ns 2783524 bytes_per_second=121.346G/s
BM_string_memset/65536/0 515 ns 515 ns 1357500 bytes_per_second=118.587G/s
BM_string_memset/131072/0 1013 ns 1012 ns 691605 bytes_per_second=120.587G/s
```
Bug: http://b/292281479
Test: treehugger
Change-Id: I45bfffedbdf0ec55a1b1341ffbab0af6d240d3a3
2023-07-27 14:23:17 -07:00
Ryan Prichard
e18f5ec398
Merge "Hold the loader mutex in linker_main once constructors are running" into main am: 6e601911f1
am: bf1e5f83ad
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2670169
Change-Id: If20c2bea4892eec1d3b5303b8319660265c956d0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-26 05:08:57 +00:00
Ryan Prichard
bf1e5f83ad
Merge "Hold the loader mutex in linker_main once constructors are running" into main am: 6e601911f1
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2670169
Change-Id: I07b3304620d440273728a8474f4aa9cc22c4aa5b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-26 04:25:18 +00:00
Ryan Prichard
6e601911f1
Merge "Hold the loader mutex in linker_main once constructors are running" into main
2023-07-26 03:19:12 +00:00
Ryan Prichard
1b58f5c94a
Merge changes I9c181568,Ic0b08511 into main am: 504590d1e2
am: 96465a7b7c
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2674457
Change-Id: Ieab9046fb2e0962a708b34d54251d6cac195067a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-25 21:05:00 +00:00
Christopher Ferris
21433531d4
Merge "No tombstones under normal bionic unit tests run." into main am: 78a74b02ad
am: 2cafbeff4c
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2673489
Change-Id: Ib1fa7e8d80dd3601148e5aad9900745f29df39bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-25 21:04:34 +00:00
Ryan Prichard
96465a7b7c
Merge changes I9c181568,Ic0b08511 into main am: 504590d1e2
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2674457
Change-Id: I0ebea0830c30d73835d672973a83f1bd47e86bae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-25 20:38:03 +00:00