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

Commit 0f56f0a9 authored by Christopher Ferris's avatar Christopher Ferris Committed by Android (Google) Code Review
Browse files

Merge "Move codec and extractor to libc_scudo."

parents 5bcf284e b47712a9
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -20,6 +20,15 @@ cc_binary {
            exclude_shared_libs: ["libavservices_minijail"],
            shared_libs: ["libavservices_minijail_vendor"],
        },
        android: {
            product_variables: {
                malloc_not_svelte: {
                    // Scudo increases memory footprint, so only enable on
                    // non-svelte devices.
                    shared_libs: ["libc_scudo"],
                },
            },
        },
    },

    header_libs: [
@@ -35,10 +44,6 @@ cc_binary {
        "-Wall",
        "-Wno-error=deprecated-declarations",
    ],

    sanitize: {
        scudo: true,
    },
}

prebuilt_etc {
+0 −6
Original line number Diff line number Diff line
@@ -31,12 +31,6 @@ static const char kSystemSeccompPolicyPath[] =
static const char kVendorSeccompPolicyPath[] =
        "/vendor/etc/seccomp_policy/mediaswcodec.policy";

// Disable Scudo's mismatch allocation check, as it is being triggered
// by some third party code.
extern "C" const char *__scudo_default_options() {
    return "DeallocationTypeMismatch=false";
}

extern "C" void RegisterCodecServices();

int main(int argc __unused, char** /*argv*/)
+5 −2
Original line number Diff line number Diff line
@@ -20,13 +20,16 @@ LOCAL_REQUIRED_MODULES_x86 := crash_dump.policy mediaextractor.policy
LOCAL_REQUIRED_MODULES_x86_64 := crash_dump.policy mediaextractor.policy

LOCAL_SRC_FILES := main_extractorservice.cpp
LOCAL_SHARED_LIBRARIES := libmedia libmediaextractorservice libbinder libutils \
ifneq (true, $(filter true, $(MALLOC_SVELTE)))
# Scudo increases memory footprint, so only use on non-svelte configs.
LOCAL_SHARED_LIBRARIES := libc_scudo
endif
LOCAL_SHARED_LIBRARIES += libmedia libmediaextractorservice libbinder libutils \
    liblog libandroidicu libavservices_minijail
LOCAL_MODULE:= mediaextractor
LOCAL_INIT_RC := mediaextractor.rc
LOCAL_C_INCLUDES := frameworks/av/media/libmedia
LOCAL_CFLAGS := -Wall -Werror
LOCAL_SANITIZE := scudo
include $(BUILD_EXECUTABLE)

# service seccomp filter
+0 −6
Original line number Diff line number Diff line
@@ -41,12 +41,6 @@ static const char kSystemSeccompPolicyPath[] =
static const char kVendorSeccompPolicyPath[] =
        "/vendor/etc/seccomp_policy/mediaextractor.policy";

// Disable Scudo's mismatch allocation check, as it is being triggered
// by some third party code.
extern "C" const char *__scudo_default_options() {
    return "DeallocationTypeMismatch=false";
}

int main(int argc __unused, char** argv)
{
    limitProcessMemory(