Commit graph

35720 commits

Author SHA1 Message Date
Pirama Arumuga Nainar
ba0a1e7397 Merge "[libm] Set pragma FENV_EACCESS for x86_64, i386" am: 057219b3f3
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1804297

Change-Id: I1766efa6caeb7b4e406b2c37add152a30cf5fbd8
2021-08-23 18:38:21 +00:00
Pirama Arumuga Nainar
057219b3f3 Merge "[libm] Set pragma FENV_EACCESS for x86_64, i386" 2021-08-23 18:25:33 +00:00
Treehugger Robot
524d5a6dbf Merge "Use the dynamic table instead of __rela?_iplt_* to find the linker's IRELATIVE relocs." am: 15681db86e am: 754fd6872f am: 5126a1b349
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1801427

Change-Id: Ibb8bc77a21ba263b57296cf72f54ae5d3af204ad
2021-08-20 22:27:59 +00:00
Treehugger Robot
5126a1b349 Merge "Use the dynamic table instead of __rela?_iplt_* to find the linker's IRELATIVE relocs." am: 15681db86e am: 754fd6872f
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1801427

Change-Id: I2fbb3b367df082dbd68b780a21eb9a7fef56f264
2021-08-20 22:03:30 +00:00
Treehugger Robot
754fd6872f Merge "Use the dynamic table instead of __rela?_iplt_* to find the linker's IRELATIVE relocs." am: 15681db86e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1801427

Change-Id: Ibdd2529f565dbd9a3304aec5d89e8c0c71f9ac0c
2021-08-20 21:50:50 +00:00
Pirama Arumuga Nainar
0c3bb2cf8f [libm] Set pragma FENV_EACCESS for x86_64, i386
Bug: http://b/157914307

This pragma enables
- -frounding-math, i.e. rounding mode set at runtime are honored
- -ffp-exception-behavior=strict, i.e. FPE semantics are preserved.
- Prevents use of FMA instructions.

Test: Build toolchain without revert https://r.android.com/1298100
      and run bionic-unit-tests.math_h*
Change-Id: I6249b20c93e0fd4ebbdfbe433da4ad4a65d3747b
2021-08-20 14:49:17 -07:00
Treehugger Robot
15681db86e Merge "Use the dynamic table instead of __rela?_iplt_* to find the linker's IRELATIVE relocs." 2021-08-20 21:33:17 +00:00
Peter Collingbourne
65bdf655c4 Use the dynamic table instead of __rela?_iplt_* to find the linker's IRELATIVE relocs.
A recent change to lld [1] made it so that the __rela?_iplt_*
symbols are no longer defined for PIEs and shared libraries. Since
the linker is a PIE, this prevents it from being able to look up
its own relocations via these symbols. We don't need these symbols
to find the relocations however, as their location is available via
the dynamic table. Therefore, start using the dynamic table to find
the relocations instead of using the symbols.

[1] f8cb78e99a

Change-Id: I4a12ae9f5ffd06d0399e05ec3ecc4211c7be2880
2021-08-20 12:07:53 -07:00
Matthew Maurer
2411a5e789 Export memalign to linker
In order to support demangling of rust symbols by the linker, we are
adding a small Rust component. Rust expects `memalign` to be present in
hosted environments, and it doesn't appear costly to enable it.

Bug: 178565008
Test: m, killall -11 keystore2 produced mangled names in tombstone
Change-Id: I8fc749000fa02a3b760c8cc55be3348b9964d931
2021-08-17 15:08:49 -07:00
Xin Li
12532362f9 [automerger skipped] Merge "Merge sc-dev-plus-aosp-without-vendor@7634622" into stage-aosp-master am: 7201b389c2 -s ours am: e23a7fb228 -s ours
am skip reason: Merged-In Ib9a83d1e92071956d9c5cdb94e0707ccaedb3a12 with SHA-1 ef713716b7 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15571662

Change-Id: Id47b0b869443159e098d004f35359a594c3cc058
2021-08-17 19:46:17 +00:00
Xin Li
e23a7fb228 [automerger skipped] Merge "Merge sc-dev-plus-aosp-without-vendor@7634622" into stage-aosp-master am: 7201b389c2 -s ours
am skip reason: Merged-In Ib9a83d1e92071956d9c5cdb94e0707ccaedb3a12 with SHA-1 ef713716b7 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15571662

Change-Id: I4bbdd6fc173cb73d934da19cfbf77b0c9cb6d648
2021-08-17 18:35:46 +00:00
Xin Li
7201b389c2 Merge "Merge sc-dev-plus-aosp-without-vendor@7634622" into stage-aosp-master 2021-08-17 18:14:57 +00:00
Colin Cross
4fc4069156 Merge changes I56b23576,I37ede846,Iec9ba776 am: 556b45ad41 am: 59e69edea2 am: 5ef0b3f016
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1796679

Change-Id: I520ea902237d23c03ec779068cc441da6dc6590e
2021-08-17 17:18:56 +00:00
Colin Cross
5ef0b3f016 Merge changes I56b23576,I37ede846,Iec9ba776 am: 556b45ad41 am: 59e69edea2
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1796679

Change-Id: I9ad0a98026ddaf6511dffeea1dec2295cac51b1d
2021-08-17 17:00:55 +00:00
Colin Cross
59e69edea2 Merge changes I56b23576,I37ede846,Iec9ba776 am: 556b45ad41
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1796679

Change-Id: I63333b1811d6173b55536c1febb5856983196c5c
2021-08-17 16:42:31 +00:00
Colin Cross
556b45ad41 Merge changes I56b23576,I37ede846,Iec9ba776
* changes:
  Replace local MUSL define with global ANDROID_HOST_MUSL
  Fix some clang-format issues
  Fix bionic-unit-tests-glibc for 32-bit musl
2021-08-17 16:29:45 +00:00
Colin Cross
4c5595c968 Replace local MUSL define with global ANDROID_HOST_MUSL
Bug: 190084016
Test: m USE_HOST_MUSL=true bionic-unit-tests-glibc
Change-Id: I56b23576cb24912112d2ae56d8ecc2e3716982fe
2021-08-16 16:44:24 -07:00
Colin Cross
14d1507619 Fix some clang-format issues
Fix some formatting issues that clang-format wanted to fix in the next
CL.

Test: builds
Change-Id: I37ede84672a2ae7c262da00319d7dbc132d7f4d8
2021-08-16 16:37:33 -07:00
Colin Cross
35d469ba4f Fix bionic-unit-tests-glibc for 32-bit musl
Musl doesn't define __NR_clock_gettime and __NR_gettimeofday on
32-bit architectures, #define them to __NR_clock_gettime32 and
__NR_gettimeofday_time32 respectively.

Bug: 190084016
Test: m USE_HOST_MUSL=true bionic-unit-tests-glibc
Change-Id: Iec9ba776a94639a4b6a3ad42f18dfdb0e3580f02
2021-08-16 16:32:53 -07:00
Xin Li
570e2ff405 Merge sc-dev-plus-aosp-without-vendor@7634622
Merged-In: Ib9a83d1e92071956d9c5cdb94e0707ccaedb3a12
Change-Id: I285b056aa2898af92ae99f8ab707147e83dcaa66
2021-08-14 06:30:55 +00:00
Automerger Merge Worker
5873274497 Merge "[automerger skipped] Merge stage-aosp-sc-ts-dev before making it an upstream am: 1f637922e6 -s ours am: 104ff169aa -s ours" into sc-qpr1-dev-plus-aosp 2021-08-13 21:32:04 +00:00
Xin Li
489532bf6e [automerger skipped] Merge stage-aosp-sc-ts-dev before making it an upstream am: 1f637922e6 -s ours am: 104ff169aa -s ours
am skip reason: Merged-In Ic7a83fb01a39113d408ed0c95d27f694d5a2649c with SHA-1 c75fbc7b8a is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15546344

Change-Id: Ic0acaef884aeaefe375b409afa7dc8f6ef6e9419
2021-08-13 21:31:40 +00:00
Xin Li
ead8fd9fe2 [automerger skipped] Merge stage-aosp-sc-ts-dev before making it an upstream am: 1f637922e6 -s ours am: f83fcbcb01 -s ours
am skip reason: Merged-In Ic7a83fb01a39113d408ed0c95d27f694d5a2649c with SHA-1 c75fbc7b8a is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15546344

Change-Id: Ic86c449191eba6544e3a30480859be61bc3b99a0
2021-08-13 21:30:43 +00:00
Xin Li
f83fcbcb01 [automerger skipped] Merge stage-aosp-sc-ts-dev before making it an upstream am: 1f637922e6 -s ours
am skip reason: Merged-In Ic7a83fb01a39113d408ed0c95d27f694d5a2649c with SHA-1 c75fbc7b8a is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15546344

Change-Id: I207ce5881b3f64fc67e08b39543b787029c3959c
2021-08-13 20:53:31 +00:00
Xin Li
104ff169aa [automerger skipped] Merge stage-aosp-sc-ts-dev before making it an upstream am: 1f637922e6 -s ours
am skip reason: Merged-In Ic7a83fb01a39113d408ed0c95d27f694d5a2649c with SHA-1 c75fbc7b8a is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/15546344

Change-Id: I7f4a750a9a4192b74cf3c9d81ff8493de71aabcc
2021-08-13 20:51:43 +00:00
Xin Li
1f637922e6 Merge stage-aosp-sc-ts-dev before making it an upstream
Bug: 169893837
Merged-In: Ic7a83fb01a39113d408ed0c95d27f694d5a2649c
Change-Id: Ib15d857903753f890e6a75f2815a441359a81fc5
2021-08-13 18:18:34 +00:00
Colin Cross
6884341f04 Merge "Build bionic unit tests for musl" am: a93cea05cf am: 1c0d2b8c86 am: 3d6b52acfc
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1793824

Change-Id: I6d65d8efd60b7f1c4b3009f3b26b51a33411c1e2
2021-08-13 01:41:36 +00:00
Colin Cross
3d6b52acfc Merge "Build bionic unit tests for musl" am: a93cea05cf am: 1c0d2b8c86
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1793824

Change-Id: Ie1f8135c450ea0106bdd7471fb6e888f3270538f
2021-08-13 01:26:52 +00:00
Colin Cross
1c0d2b8c86 Merge "Build bionic unit tests for musl" am: a93cea05cf
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1793824

Change-Id: I4f2a16da5c4a1853bcb273135f4a4717d96155d0
2021-08-13 01:15:50 +00:00
Colin Cross
a93cea05cf Merge "Build bionic unit tests for musl" 2021-08-13 00:56:48 +00:00
The Android Open Source Project
ad19c87f80 Merge ab/7633965
Bug: 169893837
Merged-In: Ic7a83fb01a39113d408ed0c95d27f694d5a2649c
Change-Id: I4494985e98790e8934f10c8ba6f6f2207b3050ab
2021-08-12 22:45:46 +00:00
Colin Cross
7da20341e9 Build bionic unit tests for musl
Modify bionic unit tests that are built for glibc so that they also
build against musl.  They don't all pass though:

With glibc:
 2 SLOW TESTS
 4 TIMEOUT TESTS
313 FAILED TESTS
  YOU HAVE 2 DISABLED TESTS

With musl:
11 SLOW TESTS
11 TIMEOUT TESTS
363 FAILED TESTS
  YOU HAVE 2 DISABLED TESTS

Bug: 190084016
Test: m bionic-unit-tests-glibc with musl
Test: atest bionic-unit-tests-static
Test: atest --host bionic-unit-tests-glibc with glibc
Change-Id: I79b6eab04fed3cc4392450df5eef2579412edfe1
2021-08-12 11:13:11 -07:00
Christopher Ferris
ef713716b7 Merge "Only run the exec once if test passes." am: 4c92da4311 am: 123d1870f4
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1788566

Change-Id: Ib9a83d1e92071956d9c5cdb94e0707ccaedb3a12
2021-08-06 20:34:19 +00:00
Christopher Ferris
123d1870f4 Merge "Only run the exec once if test passes." am: 4c92da4311
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1788566

Change-Id: I4b60d7d101062aad16ef8bf6ac8b3c23816c0a67
2021-08-06 20:24:31 +00:00
Christopher Ferris
4c92da4311 Merge "Only run the exec once if test passes." 2021-08-06 20:04:09 +00:00
Christopher Ferris
e07b33d3ad Only run the exec once if test passes.
I accidentally made the tests run MAX_RETRIES times instead of
running once when passing, and at most MAX_RETRIES when the
test fails. Also, add a bit of randomness to the usleep to try and
avoid tests syncing up on failures.

Bug: 193898572

Test: Ran unit tests and verified that a pass doesn't result in another run.
Test: Ran three copies of the unit tests at the same time to verify that
Test: there isn't a flaky test failure.
Change-Id: I8b8d3cd05ca7d1e87ce34bf10aeef84f6989fdab
2021-08-05 14:01:52 -07:00
Joel Galenson
f71046f8ef Merge "Move the Rust system property bindings into librustutils." am: ec75f703e1 am: d8700c311a
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1780298

Change-Id: I9a7d7aeb5db684f8576398346ff2312b78b96cc8
2021-08-03 14:49:40 +00:00
Joel Galenson
d8700c311a Merge "Move the Rust system property bindings into librustutils." am: ec75f703e1
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1780298

Change-Id: Ia8dfe763e10c4236072338de060900ad7be6ff43
2021-08-03 14:32:48 +00:00
Joel Galenson
ec75f703e1 Merge "Move the Rust system property bindings into librustutils." 2021-08-03 14:20:06 +00:00
Florian Mayer
1e6ca169d9 Merge "Reland "Fix GWP hooks not being restored, leading to crashes."" am: a4ffabe79b am: 1f03573276
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1783187

Change-Id: I30940219ccfd1e77e593bef62ebcbd2c859ade02
2021-08-03 08:19:36 +00:00
Florian Mayer
1f03573276 Merge "Reland "Fix GWP hooks not being restored, leading to crashes."" am: a4ffabe79b
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1783187

Change-Id: If2f61155273448844d94a212a2dc032c6c807a12
2021-08-03 08:06:37 +00:00
Florian Mayer
a4ffabe79b Merge "Reland "Fix GWP hooks not being restored, leading to crashes."" 2021-08-03 07:52:58 +00:00
Treehugger Robot
ccf8b9b6c5 Merge changes I6b097079,I6a12d50d am: 678cac51d4 am: 1988f44d6d
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1782748

Change-Id: I39376278616c927ded3a7f4de3e2efe253a6d2e1
2021-07-30 20:50:16 +00:00
Treehugger Robot
1988f44d6d Merge changes I6b097079,I6a12d50d am: 678cac51d4
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1782748

Change-Id: If080784fbff5e55942182cdfbbdbcc16f66f2479
2021-07-30 20:31:08 +00:00
Treehugger Robot
678cac51d4 Merge changes I6b097079,I6a12d50d
* changes:
  Enable posix strerror_r test in glibc
  POSIX strerror_r returns an error number, not -1
2021-07-30 20:16:35 +00:00
Florian Mayer
3a0ced8539 Reland "Fix GWP hooks not being restored, leading to crashes."
If the DispatchReset fails, the subsequent iteration has the wrong
idea of what the "original" table is, and if a subsequent DispatchReset
succeeds it unhooks them.

Repro in https://r.android.com/1767868.

Bug: 193012939
Bug: 189776979
Change-Id: I30445c053fcb785669f75d9c83056926d850edce
2021-07-30 17:59:17 +01:00
Colin Cross
4408b8abb0 Enable posix strerror_r test in glibc
Work around the incompatibility between libc++ and !_GNU_SOURCE
by defining a wrapper function around the posix strerror_r in
a file that does not include any libc++ or gtest headers.

Test: bionic-unit-tests-glibc
Change-Id: I6b097079777b5dcd802e295cc566964fe1c01382
2021-07-30 09:39:58 -07:00
Colin Cross
695af0da30 POSIX strerror_r returns an error number, not -1
The posix spec says strerror_r returns a positive error number,  not
-1 and set errno.

Test: bionic-unit-tests-static
Change-Id: I6a12d50d046f9caac299bf3bff63e6c9496c1b6f
2021-07-30 09:39:21 -07:00
Joel Galenson
e9898f393a Move the Rust system property bindings into librustutils.
Bug: 182498247
Test: Build
Change-Id: I688a1c7654d94b349b6903d9e7735656d31e7629
2021-07-29 15:55:07 -07:00
Florian Mayer
5d077fdeb0 Merge "Revert "Fix GWP hooks not being restored, leading to crashes."" am: bc1b267454 am: ff9895bde5
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1781388

Change-Id: Ib5ef42971118ae58040e5d6bd24d2e48adf22dea
2021-07-29 11:13:53 +00:00