Commit graph

36318 commits

Author SHA1 Message Date
Tao Bao
5cea27baad Merge "fastboot: Don't give parsing error for unsupported 'getvar erase-block-size'."
am: e5ff9b988c

Change-Id: I037d5d1d9c09ab91fbbd770dfab038aaf3bcc300
2017-11-03 03:35:20 +00:00
Tao Bao
e5ff9b988c Merge "fastboot: Don't give parsing error for unsupported 'getvar erase-block-size'." 2017-11-03 03:27:34 +00:00
Christopher Ferris
58e9c6a6b8 Merge "Only skip frames for local unwinds."
am: 3eccc5f50e

Change-Id: I3ca928cc49a8bab00811b138669243e1649a5af6
2017-11-03 01:43:44 +00:00
Christopher Ferris
3eccc5f50e Merge "Only skip frames for local unwinds." 2017-11-03 01:36:28 +00:00
Christopher Ferris
c56a499422 Only skip frames for local unwinds.
When doing a remote unwind, and there is a crash in the unwind stack
code or in libbacktrace, the old version would skip those frames.
This makes debugging crashes in those libraries a bit difficult.

Bug: 68820611

Test: Ran unit tests.
Test: kill -3 a zygote process and verify no frames in
Test: libunwindstack.so/libbacktrace.so.
Test: Forced a crash in libunwindstack.so and verified the tombstone
Test: contains the full crash.
Change-Id: I297e5b3775c87c0dddf57ebb423bd72ba1baf193
2017-11-02 16:22:52 -07:00
Tao Bao
67212f9083 fastboot: Don't give parsing error for unsupported 'getvar erase-block-size'.
Couldn't parse erase-block-size '0x'.
Couldn't parse logical-block-size '0x'.
mke2fs 1.43.3 (04-Sep-2016)
...

Some bootloaders explicitly return error on failed query (e.g. walleye),
while others return empty message (e.g. bullhead). We should just return
zero for empty message, instead of giving a misleading parsing error.

Test: `fastboot format userdata` on bullhead, with no parsing error.
Test: `fastboot format userdata` on walleye still works.
Change-Id: I194d41d24679929eccc65bfe895d6ab2a26315b7
2017-11-02 15:53:12 -07:00
Christopher Ferris
a302ae3b6e Merge "Add support for non-virtual thunk."
am: 0d323c12df

Change-Id: I03c398b7d7df3b1dedf46447c57de896b28dc302
2017-11-02 15:34:03 +00:00
Christopher Ferris
0d323c12df Merge "Add support for non-virtual thunk." 2017-11-02 15:31:01 +00:00
Christopher Ferris
5a72ea0f2f Add support for non-virtual thunk.
Bug: 67678053

Test: New unit tests pass.
Change-Id: If04f502e234da00a356e5ddd31acd22a6ad1a804
2017-11-01 16:24:55 -07:00
Oleg Matcovschi
45aa5ed89a Merge "fs_mgr: support reading fstab based on ro.boot.hardware.platform"
am: 3d879b10d8

Change-Id: I7dae8519843e007974d21025d72c49957caded83
2017-11-01 20:49:27 +00:00
Chih-Hung Hsieh
57270f809a Merge "Use -Werror in system/core"
am: 4ef714eae0

Change-Id: I6844cc5239711f5569a252e38bbc8c89c96cc347
2017-11-01 20:47:12 +00:00
Treehugger Robot
3d879b10d8 Merge "fs_mgr: support reading fstab based on ro.boot.hardware.platform" 2017-11-01 20:46:22 +00:00
Treehugger Robot
4ef714eae0 Merge "Use -Werror in system/core" 2017-11-01 20:41:43 +00:00
Chih-Hung Hsieh
122352d983 Use -Werror in system/core
* Move -Wall -Werror from cppflags to cflags.
* Fix/suppress warning on unused variables.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I1e05e96a1d0bcb2ccef1ce456504b3af57167cc5
2017-11-01 11:32:55 -07:00
Chih-hung Hsieh
d164933fee Merge "Use -Werror in system/core/libnativebridge"
am: 52013bc3d4

Change-Id: Ic83e320877f2a01052636e62352e7707b0eb1809
2017-11-01 16:42:43 +00:00
Chih-hung Hsieh
52013bc3d4 Merge "Use -Werror in system/core/libnativebridge" 2017-11-01 16:39:01 +00:00
Oleg Matcovschi
018d7f69da fs_mgr: support reading fstab based on ro.boot.hardware.platform
This change adds fstab.${ro.boot.hardware.platform} file into list of
searched fstab filenames.
The ${ro.boot.hardware.platform} helps consolidate init sequence based
on platform. Potentially it allows same build serve different devices.

Bug: 68663168
Change-Id: I822d5bc432e823218ebc640093cfbe5e9271d3b1
2017-11-01 09:38:21 -07:00
Christopher Ferris
a6454515f3 Merge "Move sp/pc not changing check into Unwinder."
am: 15251c24b9

Change-Id: If13e5f8f4b46bfaed5cd8654526ba4dce333b0ff
2017-11-01 15:02:48 +00:00
Christopher Ferris
5afe782a9c Merge "Fix template support."
am: 96e15c9e7d

Change-Id: Ic9d5822a6420a3c5dd0378e75ab9203b708fdf99
2017-11-01 15:02:01 +00:00
Christopher Ferris
15251c24b9 Merge "Move sp/pc not changing check into Unwinder." 2017-11-01 14:58:35 +00:00
Christopher Ferris
96e15c9e7d Merge "Fix template support." 2017-11-01 14:58:05 +00:00
Narayan Kamath
5ab03cb418 Merge "zip_archive: Allow crc_out to be nullptr in Inflate."
am: 55c9284f55

Change-Id: I31f2859b9c91033a4bd0da7cd17ec09084b3164f
2017-11-01 11:17:40 +00:00
Narayan Kamath
55c9284f55 Merge "zip_archive: Allow crc_out to be nullptr in Inflate." 2017-11-01 11:12:18 +00:00
Christopher Ferris
fda7edd13e Move sp/pc not changing check into Unwinder.
Remove this check from the DwarfSection class.

Rather than have every step function make the check, doing it at the
top level avoids having every function do the same check.

Bug: 68167269

Test: New unit tests, ran debuggerd -b on processes.
Change-Id: I23b7c799faaf26c93c1b72848df18c78de6c42fb
2017-10-31 17:51:02 -07:00
Chih-Hung Hsieh
048df230ab Use -Werror in system/core/libnativebridge
* Fix unused static variable warning.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I9c3a2031ac49368a1833a9d46af8174c3c9cd32e
2017-10-31 15:55:40 -07:00
Christopher Ferris
584333e3b2 Fix template support.
- Fix template applying to function name without a starting N.
- Fix return types for templates handling.
- Add support for the T substitution parameter.
- Fix a case where the literal L handler was not being set properly.

Bug: 67678053

Test: New unit tests, fuzzer.
Change-Id: I4f831038047eb2cd8519426f16aa2bdcb846d92d
2017-10-31 15:00:54 -07:00
James Hawkins
90cde982dc Merge "bootstat: Add another boot reason."
am: bb3769349d

Change-Id: I8893cc8af331832e4f031aaee382e15848ccf7bf
2017-10-31 20:10:06 +00:00
Treehugger Robot
bb3769349d Merge "bootstat: Add another boot reason." 2017-10-31 20:02:00 +00:00
James Hawkins
8ac79bc820 bootstat: Add another boot reason.
Bug: None
Test: None
Change-Id: I865a12e9c8833c4a345284181aa1812be3eddadd
2017-10-31 10:07:34 -07:00
Brendan Jackman
9d11756d48 Merge "logcat: Note in help that regexps are Perl-compatible"
am: 411111acf4

Change-Id: Ifbe765500c99a0a0e3ef858dbadf7ecbbf518f4a
2017-10-31 16:54:57 +00:00
Treehugger Robot
411111acf4 Merge "logcat: Note in help that regexps are Perl-compatible" 2017-10-31 16:48:47 +00:00
Brendan Jackman
a5141130f3 logcat: Note in help that regexps are Perl-compatible
The expressions accepted by the '-e'/'--grep' command line option are
PCRE:

https://android.googlesource.com/platform/system/core/+/master/logcat/logcat.cpp#1018

Say so in the help string.

Change-Id: I7f6af130d5e39570bb49310a928f5d495e5b269b
2017-10-31 12:44:54 +00:00
Christopher Ferris
6a63731ebc Merge "Switch libbacktrace new unwinder."
am: f0da1c42a3

Change-Id: I4726a4bcbbb986f3325e55e62d41fc6617a2c5e8
2017-10-31 00:48:51 +00:00
Christopher Ferris
f0da1c42a3 Merge "Switch libbacktrace new unwinder." 2017-10-31 00:33:46 +00:00
Christopher Ferris
086baf981d Switch libbacktrace new unwinder.
Update the backtrace leak tests to share a map since this is the most
common way it will be used, and it runs much faster.

Remove the CreateNew functions, and references to them.

Remove benchmarks of CreateNew functions.

Test: Builds, ran new unit tests, ran art tests.

Change-Id: I4a25a412f1a74c6d43aebbebbf32ead20ead8f94
2017-10-30 13:37:50 -07:00
Narayan Kamath
2d1e23f5d6 zip_archive: Allow crc_out to be nullptr in Inflate.
Only compute the crc32 if required. In addition :
- Add unit tests for Inflate that cover this addition.
- Fix an inconsistency in return codes that was revealed
  by this new test.

Bug: 35246701
Test: zip_archive_tests
Test: make; zipalign.
Merged-In: I31d7554378f94fc8995f707471d57cb98311e2c2
Change-Id: I05111bfa665c610f93d1c1dee987a509bf87aa65
2017-10-30 18:26:41 +00:00
Jae Shin
1d69a95b0d Merge changes from topic "rs_vndk_step3"
am: 51ec0a1387

Change-Id: I99cd5841a18417b6edd38f403efde4a867715b9a
2017-10-30 03:34:16 +00:00
Jiyong Park
fc2c73af93 Fix: make vndk namespace visible for 2016 Pixes
am: 6ed1a1c339

Change-Id: I51682220904d38750a88fd0786e2b7ad3a9e4ba8
2017-10-30 03:33:52 +00:00
Jiyong Park
03b5221a41 vndk: remove vendor/lib from the search path of the 'vndk' namespace
am: 7f654c3243

Change-Id: I18d3361d294871d3f12729ed8b8007befd3b0b88
2017-10-30 03:33:23 +00:00
Jiyong Park
3fc71ffaa3 libz is back to LLNDK
am: e58fa1b0c6

Change-Id: Id982fbbc19fff4ff4eb2e703595b25e7009abdee
2017-10-30 03:32:44 +00:00
Jiyong Park
e6840fdba7 Make the rs namespace visible
am: 7075bca364

Change-Id: Ibe1a95bb9e7978f6625884588d76dbbda0728b9d
2017-10-30 03:31:58 +00:00
Justin Yun
c6a2e38f95 Add libft2.so to ll-ndk for rs namespace
am: 136eb05892

Change-Id: I1712e67623dca027de7103acbe677241ae1ca0b6
2017-10-30 03:31:06 +00:00
Justin Yun
505f997ff5 Move libz vndk-sp from ll-ndk
am: 8ebf6ee6f6

Change-Id: I4b5c6959a67d6a08c5effcdbc0334009faa7423f
2017-10-30 03:30:10 +00:00
Jae Shin
51ec0a1387 Merge changes from topic "rs_vndk_step3"
* changes:
  Tests are run with proper namespace configs by their locations
  Fix: make vndk namespace visible for 2016 Pixes
  vndk: remove vendor/lib from the search path of the 'vndk' namespace
  libz is back to LLNDK
  Make the rs namespace visible
  Add libft2.so to ll-ndk for rs namespace
  Move libz vndk-sp from ll-ndk
2017-10-30 03:22:53 +00:00
Jiyong Park
6ed1a1c339 Fix: make vndk namespace visible for 2016 Pixes
The nativeloader tries to find the 'vndk' namespace when there is a
vendor apk in the classloader paths. This can happen even for a
downloaded app if the app is using a vendor apk via <uses-library> tag.

In order to prevent the nativeloader from failing to find the vndk
namespace, the namespace is marked as visible.

Bug: 66482442
Test: download the app mentioned in the bug, it does not crash.
Merged-In: I82e2394eb6eedcb8645e1a5b3735bbfe2735b312
Change-Id: I82e2394eb6eedcb8645e1a5b3735bbfe2735b312
(cherry picked from commit 1cc09e749f)
2017-10-30 10:27:45 +09:00
Jiyong Park
7f654c3243 vndk: remove vendor/lib from the search path of the 'vndk' namespace
'vndk' namespace is the place for VNDK-SP libs. So /vendor/lib must be
removed from its search paths. It was there just because libhardware
(which is VNDK-SP) is loading HAL libs in vendor partition from there.
However this problem has been solved by modifying the libhardware so
that HAL libs are loaded from the 'sphal' namespace and not from the
current (the 'vndk') namespace.

Bug: 37731053
Test: sailfish builds and boots
Merged-In: Ia88934a975aa8811e05b5ba408e42d132f20f4e9
Change-Id: Ia88934a975aa8811e05b5ba408e42d132f20f4e9
(cherry picked from commit f01b52895d)
2017-10-30 10:27:45 +09:00
Jiyong Park
e58fa1b0c6 libz is back to LLNDK
For 2016 pixel devices, where VNDK is not fully enforced, move libz back
to LLNDK so that we can pass the CTS without requiring the default
namespace to be isolated.

If we have libz in vndk-sp directory, test_linker_namespaces fails
because /system/lib/vndk-sp/libz.so becomes accessible. In order to make
the lib inaccessible, we have to make the default namespace isolated,
but this can't be done for 2016 pixel devices where VNDK is not fully
enforced. So, we choose to remove /system/lib/vndk-sp/libz.so and keep
the single copy at /system/lib.

Bug: 65018779
Test: android.jni.cts.JniStaticTest#test_linker_namespaces successful on
2016 pixel devices

Merged-In: Ib6b6560b02be69d2015c0afb86acf07c02b30c2f
Change-Id: Ib6b6560b02be69d2015c0afb86acf07c02b30c2f
(cherry picked from commit 697eb2da0d)
2017-10-30 10:27:45 +09:00
Jiyong Park
7075bca364 Make the rs namespace visible
This allows us to dlopen libRS_internal.so directly from the rs
namespace, not from the sphal namespace.

Bug: 64747884
Test: VtsHalRenderscriptV1_0TargetTest successful on the device built
with BOARD_VNDK_VERSION=current and [system] namespace config is applied
to /data/nativetest[64]/* processes.

Merged-In: I0b441791e395798e80a84592ca01e771bb1c201a
Change-Id: I0b441791e395798e80a84592ca01e771bb1c201a
(cherry picked from commit 421a5e46b7)
2017-10-30 10:27:45 +09:00
Justin Yun
136eb05892 Add libft2.so to ll-ndk for rs namespace
libft2.so is changed to ll-ndk that is available only for rs
namespace.

Bug: 64425518
Test: build and boot with BOARD_VNDK_VERSION=current
Merged-In: I991dc774ca9b92fb6e95a7656243a6a4ecdc0ab9
Change-Id: I991dc774ca9b92fb6e95a7656243a6a4ecdc0ab9
(cherry picked from commit 513f76394a)
2017-10-30 10:27:45 +09:00
Justin Yun
8ebf6ee6f6 Move libz vndk-sp from ll-ndk
The ABI of libz is not as stable as it is for ll-ndk.

Bug: 37617391
Test: build and boot
Merged-In: I883bc6fda268e98cc7cdd5888264170c58688794
Change-Id: I883bc6fda268e98cc7cdd5888264170c58688794
(cherry picked from commit dadd3a846f)
2017-10-30 10:27:45 +09:00