diff --git a/platform/src/proxy.cpp b/platform/src/proxy.cpp index 919426e..a4663a6 100644 --- a/platform/src/proxy.cpp +++ b/platform/src/proxy.cpp @@ -550,6 +550,18 @@ struct breakpad_instance * breakpad_init(const char * profile) assert(instance != nullptr); int ret = 0; + unsigned int disable_coredump; + MESA_load_profile_uint_def(profile, "system", "disable_coredump", &disable_coredump, 0); + if (disable_coredump > 0) + { + const struct rlimit __rlimit_vars = {.rlim_cur = 0, .rlim_max = 0}; + ret = setrlimit(RLIMIT_CORE, &__rlimit_vars); + if (ret < 0) + { + TFE_LOG_ERROR(g_default_logger, "setrlimit(RLIMIT_CORE, 0) failed: %s", strerror(errno)); + } + } + MESA_load_profile_uint_def(profile, "system", "enable_breakpad", &instance->en_breakpad, 1); if (instance->en_breakpad <= 0) {