Libunwindstack would remove duplicated items and update the `prev_map`
during reparsing `/proc/self/maps`. But we leave `prev_real_map`
pointing toward a MapInfo that will be deleted soon. It will cause a
dangling pointer issue.
Add new tests to cover this dangling pointer issue.
Bug: 155511785
Test: libunwindstack_test
Change-Id: I62e1b97bcb73f07e9349671f0b758f5ec9de16c0
This won't happen in practice because device size is never
zero. Hypothetically, if it is, PartitionCowCreator still
suggests that a CoW size of 8192 bytes needs to be created. In
reality, it is not necessary.
Test: libsnapshot_fuzzer
Bug: 155484992
Change-Id: I6c69f54820522d50c699384eec90c474ca3a9402
If a CHECK or LOG(FATAL) is hit, also attempt to log the current
corpus.
Test: pass
Bug: 154633114
Change-Id: Id0f376021011924f5d64eb5b591b5ebab6dc7dbc
libcrypto_utils is not available as 32 bit library in 64 bit devices.
Import the library as static.
Bug: 148878078
Test: nativetest/fiemap_image_test
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I2b8cd69d06607f4216e4e2220dd8561e6eff323c
Use protobuf because it already has all the fuzzing implemenetations.
Delete fuzz_utils.
Pros:
- Fuzzing protobuf is faster; it is easy to achieve 4K exec/s
- It is more guided; protobufs are fuzzed using mutators, and mutators
should have better knowledge of the structure of the fuzz data
- No more hand-written parsing code of the fuzz data. That code in
fuzz_utils.h is deleted.
- Corpus data can be reused even after adding new fields in the protobuf
- Corpus data is human-readable and easily manually written (it is
the text format of the protobuf)
Cons:
- The "actions" are "declared" in protobuf definition and "defined" in
C++, so there's more boilerplate to write. Adding a new "Action"
requires changes in both.
Test: run libsnapshot_fuzzer
Bug: 154633114
Change-Id: Idc2a6b2c087e370e4cfef53142a244b9b275389e
Introduce new command to allow setting task profiles from inside .rc
script. This is to replace usage of writepid when a service is trying
to join a cgroup. Usage example from a .rc file:
service surfaceflinger /system/bin/surfaceflinger
task_profiles HighPerformance
Bug: 155419956
Test: change .rc file and confirm task profile is applied
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I0add9c3b363a7cb1ea89778780896cae1c8a303c
Some tests require root to be run, so we require_root to run all of
them.
Test: tests pass as root
Change-Id: I5b3ca4f08e41f16e81c5d5995043ab55d379a882
Bug: 65062446
Test: multi_connect_dgram_socket is skipped for non-root
Test: multi_connect_dgram_socket passes for root
Change-Id: I610bed5987580e0c5a01952efc2e32e7d8cdf9b4
Operations on (unsigned long) f_bsize and f_bfree are correctly handled
on 64 bit architectures, but when switching to 32 bit, the
multiplication between the two could result in an overflow, causing the
test to crash.
Fix by using a uint64_t operand, hinting the compiler to handle the
whole multiplication with 64 bit operands.
Bug: 154355449
Bug: 148889015
Test: vts_libsnapshot_test (32 bit)
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: Ief5c03ff7954c4a3e8597ef6e7df467f59428877
This code was duplicated throughout LogBuffer.cpp, so refactor it into
a single location and clean up some comments along the way.
This may fix a subtle bug: if `logcat -c` is used from a
non-privileged UID, the current code may set mLast to the oldest seen
log message *from that UID* and not not the oldest log message for
that log id. That may prevent pruning from the start of that log,
resulting in old log entries that are impossible to delete.
Bug: 144382260
Test: logging works, and above scenario is not seen
Change-Id: I1749293ce6ea1697dd8a9258cfd7eab29dbeac6e
The StringPrintf one is heavily used and brings the overhead versus
fmtlib down to 1.5x rather than 2x. I don't have a convenient benchmark
for the other two.
Test: libbase tests & benchmarks
Bug: http://b/155324241
Change-Id: I9e704a360846d5520c53f668e7c315b0c0ea55f8
Remaining GPL is old and deprecated or optional.
Bug: 68860345
Bug: 69058154
Bug: 151953481
Test: no code changes
Change-Id: Ib75bd2fbcf3c96f62a03559c335d31352f06c641
Relanding unchanged - the build problem was due to a split topic.
Test: m checkbuild
Test: atest libunwindstack_unit_test
Test: lunch fvp-userdebug && mmm system/core/libunwindstack
Bug: 152255951
Change-Id: Ifd1ced65b840ef216630906eec1ec31233e0c5f1
This test is repeatedly seen to be flaky. Disable it until we can run
tests against a dedicated logd instance.
Bug: 155146087
Test: logd-unit-tests
Change-Id: I0cd953955f613e40d17df73f70543d7d2f0925b6
There are devices stuck waiting for vendor_init to finish a command,
without giving much more information. Instead of setting aside the
last run command, it's more valuable to store and dump the last 30
logs seen.
Bug: 155203339
Test: these logs appear during hung reboots
Test: normal reboots have no difference.
Change-Id: I99cae248eb81eaf34ef66b910fa653a9fa135f68
Reason for revert: Breaks rvc-d1-dev-plus-aosp: http://ab/6443190
Reverted Changes:
Ide447b89a:bionic_libc_platform_headers is only available whe...
Ia93cd3ec8:bionic_libc_platform_headers is only available whe...
Icdc495588:Make bionic_platform_headers available only for Bi...
Idfd7c87dc:bionic_libc_platform_headers is only available whe...
Bug: 152255951
Bug: 155269399
Change-Id: I4e6beba5565e604fde3a51cdce5cc4041caffa4e