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

Commit 94c9cb64 authored by Christopher Ferris's avatar Christopher Ferris Committed by Gerrit Code Review
Browse files

Merge "Replace malloc_not_svelte with malloc_low_memory." into main

parents b631cf70 1c46a008
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -240,11 +240,16 @@ cc_library_static {
        "libdebuggerd/backtrace.cpp",
        "libdebuggerd/gwp_asan.cpp",
        "libdebuggerd/open_files_list.cpp",
        "libdebuggerd/scudo.cpp",
        "libdebuggerd/tombstone.cpp",
        "libdebuggerd/tombstone_proto.cpp",
        "libdebuggerd/utility.cpp",
    ],

    cflags: [
        "-DUSE_SCUDO",
    ],

    local_include_dirs: ["libdebuggerd/include"],
    export_include_dirs: ["libdebuggerd/include"],

@@ -256,6 +261,7 @@ cc_library_static {
        "bionic_libc_platform_headers",
        "gwp_asan_headers",
        "liblog_headers",
        "scudo_headers",
    ],

    static_libs: [
@@ -273,6 +279,7 @@ cc_library_static {
        "libtombstone_proto",
        "libprocinfo",
        "libprotobuf-cpp-lite",
        "libscudo",
    ],

    target: {
@@ -312,11 +319,9 @@ cc_library_static {
            cflags: ["-DROOT_POSSIBLE"],
        },

        malloc_not_svelte: {
            cflags: ["-DUSE_SCUDO"],
            whole_static_libs: ["libscudo"],
            srcs: ["libdebuggerd/scudo.cpp"],
            header_libs: ["scudo_headers"],
        malloc_low_memory: {
            cflags: ["-UUSE_SCUDO"],
            exclude_static_libs: ["libscudo"],
        },
    },
    apex_available: [
+4 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

#pragma once

#if defined(USE_SCUDO)

#include "types.h"
#include "utility.h"

@@ -49,3 +51,5 @@ class ScudoCrashData {
  void FillInCause(Cause* cause, const scudo_error_report* report,
                   unwindstack::AndroidUnwinder* unwinder) const;
};

#endif  // USE_SCUDO
+4 −0
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@
 * limitations under the License.
 */

#if defined(USE_SCUDO)

#include "libdebuggerd/scudo.h"
#include "libdebuggerd/tombstone.h"

@@ -141,3 +143,5 @@ void ScudoCrashData::AddCauseProtos(Tombstone* tombstone,
    FillInCause(tombstone->add_causes(), &error_info_.reports[report_num++], unwinder);
  }
}

#endif  // USE_SCUDO