mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-19 21:48:35 +02:00
core: don't enable setrlimit(RLIMIT_CORE) when running with address sanitizer
With address sanitizer, the call to setrlimit() fails by default, because the core dump would be huge. That could be overwritten via ASAN_OPTIONS=disable_core=0 But just don't try to enable core-dumps with asan.
This commit is contained in:
parent
3355a2823b
commit
44df6d7938
1 changed files with 3 additions and 0 deletions
|
|
@ -110,6 +110,7 @@ _init_nm_debug (NMConfig *config)
|
|||
flags = nm_utils_parse_debug_string (env, keys, G_N_ELEMENTS (keys));
|
||||
flags |= nm_utils_parse_debug_string (debug, keys, G_N_ELEMENTS (keys));
|
||||
|
||||
#if ! defined (__SANITIZE_ADDRESS__)
|
||||
if (NM_FLAGS_HAS (flags, D_RLIMIT_CORE)) {
|
||||
/* only enable this, if explicitly requested, because it might
|
||||
* expose sensitive data. */
|
||||
|
|
@ -120,6 +121,8 @@ _init_nm_debug (NMConfig *config)
|
|||
};
|
||||
setrlimit (RLIMIT_CORE, &limit);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (NM_FLAGS_HAS (flags, D_FATAL_WARNINGS))
|
||||
_set_g_fatal_warnings ();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue