diff options
author | Christopher Ferris <cferris@google.com> | 2015-10-21 13:13:22 -0700 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2015-10-21 17:38:42 -0700 |
commit | 338c9755cfe3d009c3dfff7d108e2c3ddaa6f3bb (patch) | |
tree | 6389c5e3c195316982c8e6192513181a5fd63024 | |
parent | 834ed932095aec986a8a86ba542fd19b12151aca (diff) | |
download | libunwind-marshmallow-dr1.5-dev.tar.gz |
Fix copying of cached map data.android-6.0.1_r9android-6.0.1_r81android-6.0.1_r80android-6.0.1_r8android-6.0.1_r79android-6.0.1_r78android-6.0.1_r77android-6.0.1_r74android-6.0.1_r73android-6.0.1_r72android-6.0.1_r70android-6.0.1_r7android-6.0.1_r69android-6.0.1_r68android-6.0.1_r67android-6.0.1_r66android-6.0.1_r65android-6.0.1_r62android-6.0.1_r61android-6.0.1_r60android-6.0.1_r59android-6.0.1_r58android-6.0.1_r57android-6.0.1_r56android-6.0.1_r54android-6.0.1_r53android-6.0.1_r52android-6.0.1_r51android-6.0.1_r50android-6.0.1_r49android-6.0.1_r48android-6.0.1_r47android-6.0.1_r46android-6.0.1_r45android-6.0.1_r43android-6.0.1_r42android-6.0.1_r41android-6.0.1_r40android-6.0.1_r30android-6.0.1_r3android-6.0.1_r28android-6.0.1_r27android-6.0.1_r26android-6.0.1_r25android-6.0.1_r24android-6.0.1_r22android-6.0.1_r21android-6.0.1_r20android-6.0.1_r17android-6.0.1_r13android-6.0.1_r12android-6.0.1_r11android-6.0.1_r10android-6.0.1_r1android-6.0.0_r41marshmallow-mr3-releasemarshmallow-mr2-releasemarshmallow-mr1-releasemarshmallow-mr1-devmarshmallow-dr1.6-releasemarshmallow-dr1.5-releasemarshmallow-dr1.5-dev
When I added the new ability to read from memory, I didn't fix one
of the pointers in the map data when doing a copy.
Bug: 24352206
(cherry picked from commit 2d1a6f7913ba690595d40e487e9978e695db71d5)
Change-Id: I1671b9c06e67b3f92ff9026e453e44e872466113
-rw-r--r-- | src/Los-common.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Los-common.c b/src/Los-common.c index 111caba2..fd6ae3fa 100644 --- a/src/Los-common.c +++ b/src/Los-common.c @@ -66,6 +66,9 @@ move_cached_elf_data (struct map_info *old_list, struct map_info *new_list) /* No need to do any lock, the entire local_map_list is locked at this point. */ new_list->ei = old_list->ei; + /* Adjust the map pointer in the elf image data if necessary. */ + if (!new_list->ei.mapped) + new_list->ei.u.memory.map = new_list; /* If it was mapped before, make sure to mark it unmapped now. */ old_list->ei.mapped = false; /* Don't bother breaking out of the loop, the next while check |