diff options
author | Jiyong Park <jiyong@google.com> | 2019-05-20 11:04:18 +0900 |
---|---|---|
committer | Jiyong Park <jiyong@google.com> | 2019-05-23 23:58:12 +0900 |
commit | b66a78b2aae1b811465f0d0b0fe85458b610ab27 (patch) | |
tree | 8b26a5b4b387575178df4fe1044cc20ad0a76e37 /libc/malloc_debug/malloc_debug.cpp | |
parent | 933bd3ae66de82bc0a9d2b985e058295c08065f9 (diff) |
linker namespace name is duped when the namespace is created
A linker namespace lives longer than its caller. It is never deleted
once created in a process. Currently, the pointer to the name is simply
copied which results dangling reference when the name is actually from
temporary objects like std::object. Fixing the issue by strdup'ing the
name upon namespace creation.
Bug: 130388701
Test: atest CtsJniTestCases; the log does not show broken error messages
like
unexpected dlerror: dlopen failed: library "/system/lib64/android.frameworks.cameraservice.common@2.0.so" needed or dlopened by "/data/app/android.jni.cts-HP6GyGXYy5honHQAffUXgw==/lib/arm64/libjnitest.so" is not accessible for the namespace " mT?"
Change-Id: I25d9d76f8520f490755c189ded5659e6c9741f79
Diffstat (limited to 'libc/malloc_debug/malloc_debug.cpp')
0 files changed, 0 insertions, 0 deletions