Commit graph

34432 commits

Author SHA1 Message Date
Treehugger Robot
e9518c4259 Merge "Move __libc_int0x80 to an assembly file" am: b69a0d4969
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1592975

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia113bc06f522b69abfa1ebe18562e7c3f76b5fca
2021-02-19 19:51:28 +00:00
Elliott Hughes
dbcc54caf8 Merge "Fix some bionic death tests." am: 35e81bfc9f
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1595212

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I59bd06bf0d6631e82f93a1897f80b6830861333e
2021-02-19 19:51:21 +00:00
Elliott Hughes
47ecccf2ec Merge "Use death tests correctly." am: fabcc96a7c
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1595215

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie77636ebe6f735181d6c3fd6240eee19fbc1ca5a
2021-02-19 19:51:14 +00:00
Treehugger Robot
b06e2d9bbb Merge "Switch BionicDeathTest to #pragma once." am: 3b7cc4ad89
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1595213

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie7835e50dd2be9905b10ecf1872c19732748236c
2021-02-19 19:51:08 +00:00
Elliott Hughes
dcb2d54b36 Merge "Inline the raise(SIGABRT) for x86-64 too." am: a0a2654e2e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1595871

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6dedf3e10eeeb5e5c06b2491564e1a77dcfec64a
2021-02-19 19:51:01 +00:00
Elliott Hughes
3171a11639 Merge "Use BionicDeathTest for an assert(3) test." am: 7f7efa92df
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1595214

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I17f7e29e399c72e45d1e30cd9ec8c4183d5628e5
2021-02-19 19:50:55 +00:00
Treehugger Robot
afefbd4a82 Merge "iconv(3): ignore src_bytes_left if src_bytes is null." am: 6fe4daaa16
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1595034

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I53edc482a7951418a0b8ae25cf85ba50bd39cc89
2021-02-19 19:50:39 +00:00
Christopher Ferris
d29cac66b4 Merge "Update to v5.11 kernel headers." 2021-02-19 19:47:44 +00:00
Treehugger Robot
b69a0d4969 Merge "Move __libc_int0x80 to an assembly file" 2021-02-19 19:27:48 +00:00
Treehugger Robot
030df1d7cd Merge "Increase leniancy in an inherently flaky test." am: 18dd0731f6
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1595035

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5606fb335163d458e175e9864b4930cbe9421387
2021-02-19 19:15:50 +00:00
Elliott Hughes
35e81bfc9f Merge "Fix some bionic death tests." 2021-02-19 19:02:24 +00:00
Elliott Hughes
fabcc96a7c Merge "Use death tests correctly." 2021-02-19 18:26:00 +00:00
Treehugger Robot
3b7cc4ad89 Merge "Switch BionicDeathTest to #pragma once." 2021-02-19 18:22:53 +00:00
Elliott Hughes
a0a2654e2e Merge "Inline the raise(SIGABRT) for x86-64 too." 2021-02-19 18:19:00 +00:00
Elliott Hughes
7f7efa92df Merge "Use BionicDeathTest for an assert(3) test." 2021-02-19 18:09:44 +00:00
Treehugger Robot
6fe4daaa16 Merge "iconv(3): ignore src_bytes_left if src_bytes is null." 2021-02-19 18:09:17 +00:00
Treehugger Robot
18dd0731f6 Merge "Increase leniancy in an inherently flaky test." 2021-02-19 18:06:36 +00:00
Elliott Hughes
46958d0b87 Merge "Don't involve debuggerd in a SIGFPE test." am: 8d6d795c28
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1595216

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic2cc9bbaaeb9374c3ae8de9195e5bab74dad94dd
2021-02-19 17:31:26 +00:00
Treehugger Robot
15980fec38 Merge "Revert "[LSC] Add LOCAL_LICENSE_KINDS to bionic"" am: 067a564814
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1595437

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I40fb35265a16a28987f10abc3c8fcce669ce7419
2021-02-19 17:30:42 +00:00
Elliott Hughes
8d6d795c28 Merge "Don't involve debuggerd in a SIGFPE test." 2021-02-19 16:30:15 +00:00
Treehugger Robot
067a564814 Merge "Revert "[LSC] Add LOCAL_LICENSE_KINDS to bionic"" 2021-02-19 16:11:57 +00:00
Rupert Shuttleworth
a53fd2194a Merge "Rename ldd input file to ldd.sh to make Bazel conversion easier." am: 10e3cd784d
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1591571

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9081636dd0daa686dac902c6132e262b0ad93879
2021-02-19 15:26:55 +00:00
Jingwen Chen
0b1611e637 bp2build: convert more cc_objects.
This CL also discovered that a couple of cc_objects include headers from the bionic subdir, without declaring them in the local_include_dirs.

Test: build/bazel/scripts/milestone-2/demo.sh full && build/bazel/scripts/milestone-2/demo.sh cleanup
Change-Id: I943980b1d1c6dab39d3c27da8037e587f97f76e3
2021-02-19 09:29:41 -05:00
Rupert Shuttleworth
10e3cd784d Merge "Rename ldd input file to ldd.sh to make Bazel conversion easier." 2021-02-19 14:15:07 +00:00
Bob Badour
f6613b492f Revert "[LSC] Add LOCAL_LICENSE_KINDS to bionic"
This reverts commit 48d43034d7.

Reason for revert: Need to re-run each directory separately.

Change-Id: Ie1acfe7af0331e9ed5f17aa1dd3c48a3708d6e45
2021-02-19 06:36:45 +00:00
Jingwen Chen
b7f425177c Merge "bp2build: mark crt_beginso1 as bp2build_available." am: e89fe2021b
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1581303

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8ef609e9ff072972c78dd9c866ae8ca4ab62867a
2021-02-19 04:53:41 +00:00
Jingwen Chen
e89fe2021b Merge "bp2build: mark crt_beginso1 as bp2build_available." 2021-02-19 03:54:43 +00:00
Elliott Hughes
ba3187f102 Don't dump backtraces while running fdtrack tests.
I'm assuming this was useful while debugging, but isn't needed now.

Bug: http://b/180605583
Test: check logs
Change-Id: I9d5bb8db60e7709a9a52e29469f7fd1d5a9cb085
2021-02-18 17:25:53 -08:00
Elliott Hughes
6249f9b44e Don't involve debuggerd in a SIGFPE test.
We just want to check that SIGFPE is raised, not try to "debug" this
expected behavior.

Bug: http://b/180605583
Test: check logs
Change-Id: I11571e02c4608570e0d406adeabc36186c5bb107
2021-02-18 17:25:07 -08:00
Elliott Hughes
e657eb4f8a Fix some bionic death tests.
These were creating tombstones and spewing to the log.

You need TEST_F() rather than TEST(), and the modern style is apparently
to use `using` rather than an empty subclass.

Bug: http://b/180605583
Test: run tests, check logcat
Change-Id: I1e639d34854aeff6f042c24643b769a6bcfab877
2021-02-18 17:23:04 -08:00
Elliott Hughes
61d0706507 Use death tests correctly.
The existing attempt at a death test wrapper wasn't functional (because
the tests were TEST rather than TEST_F), and the code in that class
doesn't work anyway. Since I don't understand the intent behind the
failing dup2() calls, I've just removed this and replaced it with
BionicDeathTest which we do need to suppress all the debuggerd work
which caused this bug to be filed.

Bug: http://b/180605583
Test: treehugger
Change-Id: I7717f7ae2620452656cf07db299774dadef55766
2021-02-18 17:17:27 -08:00
Elliott Hughes
15122842ae Use BionicDeathTest for an assert(3) test.
Bug: http://b/180605583
Test: check logs
Change-Id: I5eebef156ea1185c605060fb7e9457ccaaadaf5d
2021-02-18 17:16:09 -08:00
Elliott Hughes
d63ea5627c Switch BionicDeathTest to #pragma once.
Test: treehugger
Change-Id: I3daded12812fb579e8b7d7abeb885ee7f17032e3
2021-02-18 17:15:25 -08:00
Jingwen Chen
5daf8f9c3f bp2build: mark crt_beginso1 as bp2build_available.
This leaf module is selected as the first cc_object module to be converted by
the bp2build converter.

Test: GENERATE_BAZEL_FILES=true m nothing && bp2build-sync write && bazel build //bionic/libc:crt_beginso1
Change-Id: Idf752e7b5251161a4fbd58ba52b52dd85c8fc92b
2021-02-19 00:27:32 +00:00
Rupert Shuttleworth
a7e29a8823 Rename ldd input file to ldd.sh to make Bazel conversion easier.
Test: m and bp2build write; bazel build ...
Change-Id: Ic8a4ad6ac81f034ac8b9736d99a322c48598619e
2021-02-18 23:41:55 +00:00
Elliott Hughes
3abde068bd Inline the raise(SIGABRT) for x86-64 too.
This matches what we do for arm and arm64. 32-bit x86 is too big a mess
to warrant the effort still, but the more testing is done on cuttlefish,
the more value there is to making every stack frame count.

Before:

   #00 pc 00000000000596d8 .../libc.so (syscall+24)
   #01 pc 000000000005d072 .../libc.so (abort+194)
   #02 pc 000000000005f1f0 .../libc.so (__fortify_fatal(char const*, ...)+160)

After:

   #00 pc 000000000005d07d .../libc.so (abort+205)
   #01 pc 000000000005f1e0 .../libc.so (__fortify_fatal(char const*, ...)+160)

Test: crasher64 fortify
Change-Id: Ib74cb8b36341093c268872e26020f35eb2d8ef66
2021-02-18 15:16:39 -08:00
Elliott Hughes
527b78d194 Increase leniancy in an inherently flaky test.
The example in the bug was 16ms instead of 10ms. Try 20ms?

Bug: http://b/180581857
Test: treehugger
Change-Id: I58302ad576ab5a031124244edef9df733d796c7e
2021-02-18 10:46:35 -08:00
Elliott Hughes
20c023fdb2 iconv(3): ignore src_bytes_left if src_bytes is null.
This is undefined behavior, but glibc and macOS are both lenient, and
someone hit this in the wild, so we may as well be lenient too. (The
only cost is that it's now slightly easier to write code that works on
everything except old versions of Android.)

Bug: https://issuetracker.google.com/180598400
Test: treehugger
Change-Id: Ia217169ea6283cc53f4fbf71e5abfa08356c2049
2021-02-18 10:37:22 -08:00
Pirama Arumuga Nainar
7b89be78f4 Move __libc_int0x80 to an assembly file
Bug: http://b/157081822

If __libc_int0x80 is in a C/C++ file, Clang's coverage instrumentation
adds instructions to count the number of times it gets executed [1].
With coverage instrumentation, __libc_sysinfo, used on 32-bit x86, is
initialized to the wrong value, causing dl.preinit_system_calls to fail.

Moving the function to an assembly file leaves __libc_sysinfo properly
initialized.

[1] We could change clang so it doesn't instrument functions marked
__attribute__((naked)) as a followup.

Test: `m CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS=bionic` and run
bionic-unit-tests

Change-Id: I73558253512392d345de8d5b66d38bb14b308fdf
2021-02-18 09:52:59 -08:00
Elliott Hughes
a0c6d149c9 Merge "Fix/update notices." am: 332065d57e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1590872

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id6c79e9a4b47f9032cf1997cd0948cc6c77403e9
2021-02-17 19:25:40 +00:00
Elliott Hughes
332065d57e Merge "Fix/update notices." 2021-02-17 17:51:06 +00:00
Mathew Inwood
7b5df02722 Merge "Set updatable=false explicitly." am: ede54420ba
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1590073

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I003215889ddf8fdba0aa1cd771ca99b9d78e3aab
2021-02-17 09:59:18 +00:00
Mathew Inwood
ede54420ba Merge "Set updatable=false explicitly." 2021-02-17 09:55:07 +00:00
Rupert Shuttleworth
aa1c7bf0e9 Merge "Mark cc_library_headers targets as being bp2build_available." am: 9432c923b1
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1588412

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4069b01dbe20b661761165029cc80bfe46223953
2021-02-17 09:42:03 +00:00
Rupert Shuttleworth
9432c923b1 Merge "Mark cc_library_headers targets as being bp2build_available." 2021-02-17 08:57:19 +00:00
Bob Badour
fa80d89c42 Merge "Revert "[LSC] Add LOCAL_LICENSE_KINDS to bionic"" am: 22801c7c8d
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1589817

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icc7e422038093e3eb6ec5006090aff91c73adff3
2021-02-17 02:05:40 +00:00
Rupert Shuttleworth
06e2ef75a0 Merge "Mark ldd as executable for Bazel builds to work." am: 592ef756a0
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1590351

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I087931f53dbd4ec7f2d6523ee1984b7a04e980d7
2021-02-17 02:05:15 +00:00
Bob Badour
22801c7c8d Merge "Revert "[LSC] Add LOCAL_LICENSE_KINDS to bionic"" 2021-02-17 01:59:45 +00:00
Rupert Shuttleworth
592ef756a0 Merge "Mark ldd as executable for Bazel builds to work." 2021-02-17 01:34:29 +00:00
Christopher Ferris
05667cd66a Update to v5.11 kernel headers.
Kernel headers coming from:

Git: https://android.googlesource.com/kernel/common/
Branch: android-mainline
Tag: android-mainline-5.11

Test: Built cuttlefish and flame images. Ran bionic unit tests on both.
Change-Id: Ie60337aafad4bda55af99b6c8fe9f56bf2fa787f
2021-02-16 16:01:34 -08:00