Commit graph

21282 commits

Author SHA1 Message Date
Elliott Hughes
5d949da8a9 tests/utils.h should #include <sys/sysmacros.h>
Bug: https://github.com/android-ndk/ndk/issues/398
Test: builds
Change-Id: Ie81b49787d468e409db4024763f29946d3e4250f
2017-05-17 11:43:39 -07:00
Dan Willemsen
3d68fca0da Stop using $(TARGET_OUT_INTERMEDIATE_LIBRARIES)
It's going away, so use the built versions in the per-library
intermediate directories instead.

Test: `m -j bionic-unit-tests` produces the same output before/after
Change-Id: Ia5cd874d13129b2be89cdc26e4ec598be4003c87
2017-05-16 15:25:35 -07:00
Christopher Ferris
6fba793bc3 Merge "libc: ARM64: fix memset for non-standard ZVA sizes" 2017-05-16 20:07:21 +00:00
Christopher Ferris
d84c30ddec Merge "Add support for modifying decay timer." 2017-05-16 14:02:53 +00:00
Kevin Brodsky
f19eeb8446 libc: ARM64: fix memset for non-standard ZVA sizes
372f19e9e2 ("libc: ARM64: update memset/strlen/memcpy/memmove to
newlib/cortex-strings") introduced a bug in memset, only occurring
on the [set_long + zero + non-standard ZVA size] path, more
specifically when DCZID_EL0 reports a size different to 64 or 128.

On platforms with such sizes reported by DCZID_EL0, various string*
unit tests fail due to memset zeroing memory before and/or after the
area it is supposed to set.

Test: bionic-unit-tests --gtest_filter=string*
Change-Id: Idb80c0269226e40e343645a58608e3f324378468
2017-05-16 11:29:49 +01:00
Christopher Ferris
a1c0d2fd4c Add support for modifying decay timer.
Add the mallopt function, and only a single option so far.

Bug: 36401135

Test: Built and booted bullhead.
Test: Ran jemalloc unit tests.
Test: Ran bionic unit tests.
Test: Ran a test that allocated and free'd a large piece of memory,
Test: and verified that after changing the parameter, the PSS
Test: sticks around (decay timer set to 1), the PSS is purged (decay
Test: timer set to 0).
Change-Id: I6927929b0c539c1023d34772d9e26bb6a8a45877
2017-05-15 16:59:16 -07:00
Christopher Ferris
f0ddcc676c Merge "Add support for cortex-a73." 2017-05-15 22:00:44 +00:00
Christopher Ferris
94bd274551 Add support for cortex-a73.
Bug: 37647380

Test: Built target with cortex-a73 for both 32 bit/64 bit.
Test: Built target with cortex-a53.cortex-a57 for both 32 bit/64 bit.
Test: Ran bionic unit tests, ran art target tests.

(cherry picked from commit 6fca047b53)

Change-Id: I2c48e1bc7f4a3c4548d1c66f87eab19c8618a0b8
2017-05-15 12:44:58 -07:00
Elliott Hughes
ac58d33d34 Merge "test: check unbounded memory leak in pthread detach" 2017-05-15 16:20:05 +00:00
Zhenhua WANG
cf17b487ef test: check unbounded memory leak in pthread detach
In pthread_leak.detach test, compare the memory usage after two same
scenarios - all children threads have exited. Thus, test emulated by
NativeBridge, which may reserve a memory pool, will pass if it's not
unbounded leak.

Bug: https://issuetracker.google.com/37920774
Test: CtsBionicTestCases
Change-Id: Ia51aa67bacb588284747652b36ea5d8e85bea832
2017-05-12 11:09:45 -07:00
Treehugger Robot
d785b4465e Merge "Clean up __isthreaded." 2017-05-12 01:35:51 +00:00
Treehugger Robot
23672d30e2 Merge "Run bionic/libc/tools/genversion-scripts.py" 2017-05-11 23:52:15 +00:00
Elliott Hughes
dfcb82d92d Clean up __isthreaded.
__isthreaded is annoying for ARC++ and useless for everyone. Just hard-code
the value in ndk_cruft for LP32 and be done with it.

Bug: N/A
Test: builds
Change-Id: I08f11a404bbec55ed57cb1e18b5116163c7d7d13
2017-05-11 15:29:03 -07:00
Elliott Hughes
a57476b661 Run bionic/libc/tools/genversion-scripts.py
When 2e8e5e60b6 was cherrypicked, we
didn't regenerate the generated files.

Bug: N/A
Test: builds
Change-Id: I87730e834520aea742738708237d11a798bf3220
2017-05-11 15:14:41 -07:00
Treehugger Robot
0e986b8d5d Merge "Fix clang-tidy perfomrance warnings." 2017-05-11 02:46:43 +00:00
wy
828b9e162f Fix clang-tidy perfomrance warnings.
Change-Id: Ibf3d32a5ba1cb70158d857be3d20aa3d1a870341
Test: build with WITH_TIDY=1
2017-05-10 15:57:26 -07:00
Treehugger Robot
a93fcd0394 Merge "greylist is no longer enabled by default." 2017-05-10 02:33:30 +00:00
Treehugger Robot
9259c5bde6 Merge "Remove known failures from arm ifunc tests" 2017-05-10 02:27:57 +00:00
Treehugger Robot
3c71e1ae18 Merge "Cope with AT_SYSINFO not being set on x86." 2017-05-10 01:28:55 +00:00
Jiyong Park
37b91af0f3 greylist is no longer enabled by default.
greylist is needed only for application namepaces. Since we started using
linker-namesapces for vendors and other platform apps linker should not
enable greylist workaround by default.

Bug: http://b/37731053
Bug: https://issuetracker.google.com/38146125
Test: sailfish builds and boots
Test: bionic-unit-tests and linker-unit-tests pass
Change-Id: Iee83db6fb1ae754f5ade18491321d9bca3b5ead4
(cherry picked from commit e8ffe56a9c)
2017-05-09 17:59:00 -07:00
Elliott Hughes
4119281323 Merge "Zero-initialize user_desc for __set_thread_area." 2017-05-09 23:59:09 +00:00
Elliott Hughes
b291d08af2 Zero-initialize user_desc for __set_thread_area.
The kernel does seem to read some of the "unused" fields if only to do
basic validity checks.

valgrind complained about this, and I'm not convinced it's spurious.

Bug: http://b/38034461
Test: ran tests
Change-Id: I077fcc75bf0738491242166fc4576a9693ce18a5
2017-05-09 14:39:24 -07:00
Elliott Hughes
9ae23720aa Cope with AT_SYSINFO not being set on x86.
Bug: http://b/38034461
Test: ran dexdump under valgrind on x86
Change-Id: I6a54c7ed4fe4e68731e099d9569ab788379820f8
2017-05-09 14:26:30 -07:00
Christopher Ferris
ea5ee452c9 Merge "Add new memchr/strrchr tests." 2017-05-09 16:40:31 +00:00
Christopher Ferris
2f030af250 Add new memchr/strrchr tests.
There are new optimizations for these functions, so adding some extra
testing for these routines.

Also, clean up the strchr test slightly with some extra comments.

Test: Ran new tests on glibc version, and on angler.
Change-Id: I41bf4e5e2c84295cc1ce9d2226ed57c2d228d7b8
2017-05-08 20:10:32 -07:00
Treehugger Robot
1f9e648878 Merge "Make raise/abort work with stale cached pid/tid values." 2017-05-06 00:56:21 +00:00
Josh Gao
bf2af69fb2 Make raise/abort work with stale cached pid/tid values.
Switch raise to using tgkill with direct syscalls of getpid/gettid,
and switch abort to use raise(SIGABRT).

Bug: http://b/37769298
Test: debuggerd_test
Change-Id: If6f9d17fd8ae6177e742dc9f2f44bd78539431ba
2017-05-05 14:25:24 -07:00
Treehugger Robot
e6691d3470 Merge changes from topic 'mips_seccomp_fixes'
* changes:
  [MIPS64] Enable necessary mips64 syscalls in seccomp whitelist
  Fix MIPS seccomp definitions for PRIMARY and SECONDARY arch
2017-05-05 18:31:33 +00:00
Lazar Trsic
dd5bd456fb [MIPS64] Enable necessary mips64 syscalls in seccomp whitelist
Allow execution of: newfstatat, fstat and cacheflush syscalls
for mips64 arch.

Test: Boot mips64 emulator to homescreen with 3.18 kernel.
emulator -kernel prebuilts/qemu-kernel/mips64/3.18/kernel-qemu2

Change-Id: Ib5d6b0060f3e17b64d86fc944aa83a5240d512f8
2017-05-05 15:37:11 +02:00
Lazar Trsic
22b4351d5e Fix MIPS seccomp definitions for PRIMARY and SECONDARY arch
Set correct values for PRIMARY and SECONDARY arch definitions
to match LE MIPS architectures.
This change is resolving boot problem for mips32 arch with 3.18 kernel.
This also fixes mips64 issue related to PRIMARY_ARCH definition,
but in order to boot to home screen it needs additional syscalls whitelisted
which will be introduced in separate patch.

Tested on emulator:
emulator -kernel prebuilts/qemu-kernel/mips/3.18/kernel-qemu2

Change-Id: I68dfd136c22141933a8a8c5336db01a02f00b0df
2017-05-05 15:27:58 +02:00
Treehugger Robot
86b3494e3b Merge "libc: clean up ARM64 copyright notices" 2017-05-05 07:15:09 +00:00
Jake Weinstein
28285f5338 libc: clean up ARM64 copyright notices
Test: None needed

Change-Id: I3626a92329e954f67bada6ed73f3033225bbfef5
2017-05-04 12:59:53 -04:00
Treehugger Robot
05fd20c797 Merge changes Ia7200bf0,I86999bb7
* changes:
  versioner: fix leak.
  versioner: add symlink for dependencies.
2017-05-04 04:08:22 +00:00
Dimitry Ivanov
c42b4bb097 Remove known failures from arm ifunc tests
Since clang does not produce IRELATIVE relocations
this test started passing when we switched away from gcc
This is still a problem because it now leads to
situation where static ifuncs become globally visible
but this is a different problem.

Test: bionic-unit-tests --gtest_filer=dl*
Change-Id: Id27ba5093b88519c00acbc43ab8a991a671a9f51
2017-05-03 11:01:00 -07:00
Christopher Ferris
5725481f1e Merge "Move libc_log code into libasync_safe." 2017-05-03 17:43:35 +00:00
Dimitry Ivanov
846924ae95 Merge "Add ifunc for variable test-case" 2017-05-03 16:11:27 +00:00
Christopher Ferris
7a3681e5b6 Move libc_log code into libasync_safe.
This library is used by a number of different libraries in the system.
Make it easy for platform libraries to use this library and create
an actual exported include file.

Change the names of the functions to reflect the new name of the library.

Run clang_format on the async_safe_log.cpp file since the formatting is
all over the place.

Bug: 31919199

Test: Compiled for angler/bullhead, and booted.
Test: Ran bionic unit tests.
Test: Ran the malloc debug tests.
Change-Id: I8071bf690c17b0ea3bc8dc5749cdd5b6ad58478a
2017-05-03 08:50:43 -07:00
Treehugger Robot
6323cfad74 Merge "Shared namespaces inherit parent ns properties" 2017-05-03 01:28:35 +00:00
Dimitry Ivanov
f1cb669a9c Shared namespaces inherit parent ns properties
Make shared namespace inherit namespace links and
search/permitted paths from the parent namespace.

Bug: http://b/37854032
Test: bionic_unit_tests --gtest_filter=dl*:Dl*
Change-Id: I174661d4a1dd0cbe4a378179073719aa955f3592
(cherry picked from commit ec43dd6c36)
2017-05-02 16:42:28 -07:00
Dimitry Ivanov
21975b2861 Add ifunc for variable test-case
Also move ifunc tests to clang and c++.

Test: bionic-unit-tests --gtest_filter=dlfcn.ifunc*
Change-Id: I008c4fc01470c8e4d314003c03a2b63ff9bf7fd8
2017-05-02 16:35:20 -07:00
Yabin Cui
3f4735fafa Merge "Fix pthread_barrier_smoke test (part 2)." 2017-05-02 23:20:32 +00:00
Yabin Cui
ab4cddc329 Fix pthread_barrier_smoke test (part 2).
Bug:http://b/37652807
Test: run bionic-unit-tests.
Change-Id: Iaea553177956c5d08f754210273637f69d888c20
2017-05-02 16:18:13 -07:00
Treehugger Robot
85408ef2da Merge "Fix test compile errors after LLVM rebase" 2017-05-02 22:25:59 +00:00
Treehugger Robot
5c7107434b Merge "Fix pthread_barrier_smoke test." 2017-05-02 21:51:42 +00:00
Yi Kong
2d3122c90b Fix test compile errors after LLVM rebase
After the new rebase of Clang, we now support the alloc_size attribute,
so we can remove the warning about switching to alloc_size once Clang
has support.

Also fix an issue where 'false' is returned in a main method.

Test: make cts
Bug: 37752547
Change-Id: I32ee814aaa0338567cb8174a68d7ee1bfece2f75
2017-05-02 21:14:42 +00:00
Yabin Cui
d5c04c5ebb Fix pthread_barrier_smoke test.
Bug: http://b/37652807
Test: run bionic-unit-tests.
Change-Id: Id7245223bc2a284efed6e710892b58947ef5d555
2017-05-02 12:57:39 -07:00
Treehugger Robot
ca5e0f49ca Merge "versioner: disable container overflow checks" 2017-05-02 03:50:29 +00:00
Treehugger Robot
87a47e1bb2 Merge "linker: add android_get_exported_namespace" 2017-05-02 01:37:04 +00:00
Andreas Gampe
d10d3eece1 versioner: disable container overflow checks
Temporary workaround.

Bug: 37775238
Test: ASAN_OPTIONS= SANITIZE_HOST=address m
Change-Id: If9e9df45d83f8412caafcece87337a5c9df3a1c8
2017-05-01 16:31:51 -07:00
Treehugger Robot
fd478a8cba Merge "fix half-deleted comments in tests" 2017-05-01 20:17:21 +00:00