Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 067a7249 authored by Steven Moreland's avatar Steven Moreland
Browse files

log for double-creation of BinderProxyNativeData.

This is pretty rare, but if it's happening when we're seeing
these memory corruption bugs, worth it to log this in order
to help debug.

Bug: 405737267
Test: N/A
Change-Id: I126ee20d211b0da49cd936fa5ce7bdff24763f9e
parent 4c269cdc
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -977,6 +977,9 @@ jobject javaObjectForIBinder(JNIEnv* env, const sp<IBinder>& val)
    BinderProxyNativeData* actualNativeData = getBPNativeData(env, object);
    if (actualNativeData != nativeData) {
        delete nativeData;

        // added to help debug bugs like b/405737267, feel free to delete
        ALOGE("Two threads raced to create BinderProxyNativeData.");
    }

    return object;