diff options
author | Christopher Ferris <cferris@google.com> | 2017-06-13 18:09:13 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-06-13 18:09:13 +0000 |
commit | 407abedb3bd5285da10d0a6b69705c82c9778dcf (patch) | |
tree | d4aa46ca6b3bfc1df4ac4a9392b9c2070fca5485 | |
parent | 451c99c3ae127b047d884b3894fc106ce10a6811 (diff) | |
parent | 3d5ff8ecfa449d74a02ceebd547628b5d09669f6 (diff) | |
download | libunwind-407abedb3bd5285da10d0a6b69705c82c9778dcf.tar.gz |
Avoid using arg pointer. am: 76a0b9f6a9 am: 7162c82740 am: 3169fc88c8
am: 3d5ff8ecfa
Change-Id: If9c5eda9b3348bbacba66aea8d2db9d35827d7fb
-rw-r--r-- | src/x86/Ginit.c | 9 | ||||
-rw-r--r-- | src/x86_64/Ginit.c | 9 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/x86/Ginit.c b/src/x86/Ginit.c index 4863c15d..6748b551 100644 --- a/src/x86/Ginit.c +++ b/src/x86/Ginit.c @@ -162,10 +162,13 @@ access_mem (unw_addr_space_t as, unw_word_t addr, unw_word_t *val, int write, } else { - /* validate address */ - const struct cursor *c = (const struct cursor *)arg; - if (c && c->validate && validate_mem(addr)) + /* ANDROID support update. */ +#ifdef CONSERVATIVE_CHECKS + if (validate_mem(addr)) return -1; +#endif + /* End of ANDROID update. */ + /* ANDROID support update. */ #ifdef UNW_LOCAL_ONLY if (map_local_is_readable (addr, sizeof(unw_word_t))) diff --git a/src/x86_64/Ginit.c b/src/x86_64/Ginit.c index 672b667a..60d973bf 100644 --- a/src/x86_64/Ginit.c +++ b/src/x86_64/Ginit.c @@ -179,11 +179,12 @@ access_mem (unw_addr_space_t as, unw_word_t addr, unw_word_t *val, int write, } else { - /* validate address */ - const struct cursor *c = (const struct cursor *)arg; - if (likely (c != NULL) && unlikely (c->validate) - && unlikely (validate_mem (addr))) + /* ANDROID support update. */ +#ifdef CONSERVATIVE_CHECKS + if (unlikely (validate_mem (addr))) return -1; +#endif + /* End of ANDROID update. */ /* ANDROID support update. */ #ifdef UNW_LOCAL_ONLY |