diff options
| author | Christopher Ferris <cferris@google.com> | 2018-11-15 14:06:26 -0800 |
|---|---|---|
| committer | Christopher Ferris <cferris@google.com> | 2018-11-15 14:06:26 -0800 |
| commit | 5565906732d4f9309f3016c16eb6e1f508982380 (patch) | |
| tree | 26a954ecd3b60d635939628d2be3eb7eef6ad0e1 /libunwindstack/tests | |
| parent | 5729cff611be1dbb75c34695ab195ab878d44420 (diff) | |
| download | system_core-5565906732d4f9309f3016c16eb6e1f508982380.tar.gz system_core-5565906732d4f9309f3016c16eb6e1f508982380.tar.bz2 system_core-5565906732d4f9309f3016c16eb6e1f508982380.zip | |
Remove overly restrictive check for memory.
Remove unit test that is not needed any more.
Slightly reorganize the code around the changed check.
Bug: 77958880
Test: Ran backtrace tests with new linker options.
Test: Ran libunwindstack unit tests.
Change-Id: Ie95707323fb51616a093cafb83e0343fa24e7e61
Diffstat (limited to 'libunwindstack/tests')
| -rw-r--r-- | libunwindstack/tests/MapInfoGetElfTest.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/libunwindstack/tests/MapInfoGetElfTest.cpp b/libunwindstack/tests/MapInfoGetElfTest.cpp index f3b467955..99f8fa3b0 100644 --- a/libunwindstack/tests/MapInfoGetElfTest.cpp +++ b/libunwindstack/tests/MapInfoGetElfTest.cpp @@ -290,27 +290,6 @@ TEST_F(MapInfoGetElfTest, file_backed_non_zero_offset_partial_file_whole_elf64) ASSERT_TRUE(elf->memory()->ReadFully(0x1000, buffer.data(), 1)); } -TEST_F(MapInfoGetElfTest, process_memory_not_read_only) { - MapInfo info(nullptr, 0x9000, 0xa000, 0x1000, 0, ""); - - // Create valid elf data in process memory only. - Elf64_Ehdr ehdr; - TestInitEhdr<Elf64_Ehdr>(&ehdr, ELFCLASS64, EM_AARCH64); - ehdr.e_shoff = 0x2000; - ehdr.e_shentsize = sizeof(Elf64_Shdr) + 100; - ehdr.e_shnum = 0; - memory_->SetMemory(0x9000, &ehdr, sizeof(ehdr)); - - Elf* elf = info.GetElf(process_memory_, ARCH_ARM64); - ASSERT_TRUE(elf != nullptr); - ASSERT_FALSE(elf->valid()); - - info.elf.reset(); - info.flags = PROT_READ; - elf = info.GetElf(process_memory_, ARCH_ARM64); - ASSERT_TRUE(elf->valid()); -} - TEST_F(MapInfoGetElfTest, check_device_maps) { MapInfo info(nullptr, 0x7000, 0x8000, 0x1000, PROT_READ | MAPS_FLAGS_DEVICE_MAP, "/dev/something"); |
