1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-05 09:17:44 +03:00
systemd-stable/src/coredump
Zbigniew Jędrzejewski-Szmek e4d4c5f9ee coredump: do not crash if we failed to acquire exe path
The COREDUMP_EXE attribute is "optional", i.e. we continue to process the
crash even if we didn't acquire it. The coredump generation code assumed
that it is always available:

 #5 endswith at ../src/fundamental/string-util-fundamental.c:41
 [ endswith() is called with NULL here, and an assertion fails. ]
 #6 submit_coredump at ../src/coredump/coredump.c:823
 #7 process_socket at ../src/coredump/coredump.c:1038
 #8 run at ../src/coredump/coredump.c:1413

We use the exe path for loop detection, and also (ultimately) pass it to
dwfl_core_file_report(). The latter seems to be fine will NULL, so let's just
change our code to look at COMM, which should be more reliable anyway.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2036517.

(cherry picked from commit c790632cab)
2022-01-04 16:27:51 +01:00
..
coredump-vacuum.c Define FOREACH_DIRENT through FOREACH_DIRENT_ALL 2021-12-15 22:50:00 +01:00
coredump-vacuum.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
coredump.c coredump: do not crash if we failed to acquire exe path 2022-01-04 16:27:51 +01:00
coredump.conf fix: point to the correct drop-ins subdirectory for confs 2021-04-22 09:36:14 +02:00
coredumpctl.c Make pager_open() return void 2021-11-03 15:24:56 +01:00
meson.build coredump: move elf parsing utilities to src/shared/elf-util 2021-11-30 16:49:59 +00:00
test-coredump-vacuum.c tree-wide: use UINT64_MAX or friends 2021-03-05 07:10:13 +09:00