diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-07-23 02:11:05 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-07-23 02:11:05 +0000 |
commit | dd534e700dfafab38f04cf92c9bd824f113cf4bd (patch) | |
tree | e9a2fedf55835052b36beaf2fc40a98d2eccc8a5 /linker/linker_block_allocator_test.cpp | |
parent | 26b816e3ddc4127b2d9e9b282982fa36941246f5 (diff) | |
parent | 708013e81c289b059399502dad55d534b150d742 (diff) |
Snap for 6701932 from 708013e81c289b059399502dad55d534b150d742 to sc-release
Change-Id: I31f961d20b2c644cfe88d8bb0c946524e312b55c
Diffstat (limited to 'linker/linker_block_allocator_test.cpp')
-rw-r--r-- | linker/linker_block_allocator_test.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/linker/linker_block_allocator_test.cpp b/linker/linker_block_allocator_test.cpp index 359eefbab..6fb2b2680 100644 --- a/linker/linker_block_allocator_test.cpp +++ b/linker/linker_block_allocator_test.cpp @@ -47,14 +47,14 @@ struct test_struct_nominal { * this one has size below allocator cap which is 2*sizeof(void*) */ struct test_struct_small { - char dummy_str[5]; + char str[5]; }; /* * 1009 byte struct (1009 is prime) */ struct test_struct_larger { - char dummy_str[1009]; + char str[1009]; }; static size_t kPageSize = sysconf(_SC_PAGE_SIZE); @@ -131,14 +131,14 @@ static void protect_all() { allocator.protect_all(PROT_READ); allocator.protect_all(PROT_READ | PROT_WRITE); // check access - page2_ptr->dummy_str[23] = 27; - page1_ptr->dummy_str[13] = 11; + page2_ptr->str[23] = 27; + page1_ptr->str[13] = 11; allocator.protect_all(PROT_READ); fprintf(stderr, "trying to access protected page"); // this should result in segmentation fault - page1_ptr->dummy_str[11] = 7; + page1_ptr->str[11] = 7; } TEST(linker_allocator, test_protect) { |